mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
* Implements graceful shutdown of agent.DataAccess and underlying Datastore/Logstore/MessageQueue * adds tests for closing agent.DataAccess and Datastore
31 lines
509 B
Go
31 lines
509 B
Go
package mqs
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/fnproject/fn/api/models"
|
|
)
|
|
|
|
type Mock struct {
|
|
FakeApp *models.App
|
|
Apps []*models.App
|
|
FakeRoute *models.Route
|
|
Routes []*models.Route
|
|
}
|
|
|
|
func (mock *Mock) Push(context.Context, *models.Call) (*models.Call, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
func (mock *Mock) Reserve(context.Context) (*models.Call, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
func (mock *Mock) Delete(context.Context, *models.Call) error {
|
|
return nil
|
|
}
|
|
|
|
func (mock *Mock) Close() error {
|
|
return nil
|
|
}
|