mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Implement graceful shutdown of agent.DataAccess (#1008)
* Implements graceful shutdown of agent.DataAccess and underlying Datastore/Logstore/MessageQueue * adds tests for closing agent.DataAccess and Datastore
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package models
|
||||
|
||||
import "context"
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
)
|
||||
|
||||
// Message Queue is used to impose a total ordering on jobs that it will
|
||||
// execute in order. calls are added to the queue via the Push() interface. The
|
||||
@@ -49,4 +52,8 @@ type MessageQueue interface {
|
||||
// the job does not have an outstanding reservation, error. If a job did not
|
||||
// exist, succeed.
|
||||
Delete(context.Context, *Call) error
|
||||
|
||||
// Close will close any underlying connections as needed.
|
||||
// Close is not safe to be called from multiple threads.
|
||||
io.Closer
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user