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:
Gerardo Viedma
2018-05-21 11:28:21 +01:00
committed by GitHub
parent 105d9b8f1d
commit ea1f94253f
19 changed files with 180 additions and 12 deletions

View File

@@ -116,3 +116,8 @@ func (m *metricds) GetLog(ctx context.Context, appName, callID string) (io.Reade
// instant & no context ;)
func (m *metricds) GetDatabase() *sqlx.DB { return m.ds.GetDatabase() }
// Close calls Close on the underlying Datastore
func (m *metricds) Close() error {
return m.ds.Close()
}