State: Expose NoopStore implementation type

This commit is contained in:
diamondburned 2020-11-29 17:19:47 -08:00
parent 44909beb5b
commit e0adbfab35
1 changed files with 4 additions and 1 deletions

View File

@ -114,9 +114,12 @@ func (errs *ResetErrors) append(err error) {
}
}
// Noop is the value for a NoopStore.
var Noop = NoopStore{}
// Noop is a no-op implementation of all store interfaces. Its getters will
// always return ErrNotFound, and its setters will never return an error.
var Noop = noop{}
type NoopStore = noop
// NoopCabinet is a store cabinet with all store methods set to the Noop
// implementations.