Commit 205f9f34 authored by Łukasz Magiera's avatar Łukasz Magiera

Define GC/CheckedDatastore interfaces

parent e8521f97
......@@ -81,9 +81,26 @@ var ErrBatchUnsupported = errors.New("this datastore does not support batching")
// implement to leverage type safety checks.
type ThreadSafeDatastore interface {
Datastore
IsThreadSafe()
}
// CheckedDatastore is an interface that should be implemented by datastores
// which may need checking on-disk data integrity.
type CheckedDatastore interface {
Datastore
Check() error
}
// GCDatastore is an interface that should be implemented by datastores which
// don't free disk space by just removing data from them
type GCDatastore interface {
Datastore
CollectGarbage() error
}
// Errors
// ErrNotFound is returned by Get, Has, and Delete when a datastore does not
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment