go/store/nbs: nbs_metrics_wrapper.go: Make sure metrics wrapper implements TableFileStore.

This commit is contained in:
Aaron Son
2020-04-08 09:29:43 -07:00
parent 871eed1fe6
commit 9583303dad
+7
View File
@@ -39,6 +39,8 @@ func NewNBSMetricWrapper(nbs *NomsBlockStore) *NBSMetricWrapper {
}
}
var _ TableFileStore = &NBSMetricWrapper{}
// Sources retrieves the current root hash, and a list of all the table files
func (nbsMW *NBSMetricWrapper) Sources(ctx context.Context) (hash.Hash, []TableFile, error) {
return nbsMW.nbs.Sources(ctx)
@@ -54,6 +56,11 @@ func (nbsMW *NBSMetricWrapper) SetRootChunk(ctx context.Context, root, previous
return nbsMW.nbs.SetRootChunk(ctx, root, previous)
}
// Forwards SupportedOperations to wrapped block store.
func (nbsMW *NBSMetricWrapper) SupportedOperations() TableFileStoreOps {
return nbsMW.nbs.SupportedOperations()
}
// GetManyCompressed gets the compressed Chunks with |hashes| from the store. On return,
// |foundChunks| will have been fully sent all chunks which have been
// found. Any non-present chunks will silently be ignored.