Documentation
¶
Index ¶
- func New(l hclog.Logger) (db.KVStore, error)
- type BCStore
- func (bcs *BCStore) Capabilities() []db.KVCapability
- func (bcs *BCStore) Close() error
- func (bcs *BCStore) Del(_ context.Context, k string) error
- func (bcs *BCStore) Get(_ context.Context, k string) ([]byte, error)
- func (bcs *BCStore) Keys(_ context.Context, f string) ([]string, error)
- func (bcs *BCStore) Put(_ context.Context, k string, v []byte) error
- func (bcs *BCStore) SetEventFunc(f func(db.Event))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BCStore ¶
type BCStore struct {
// contains filtered or unexported fields
}
BCStore is a store implementation based on the bitcask storage engine.
func (*BCStore) Capabilities ¶
func (bcs *BCStore) Capabilities() []db.KVCapability
Capabilities returns that this key/value store supports te mutable property, allowing it to be writeable to the higher level systems.
func (*BCStore) Close ¶
Close terminates the connection to the bitcask and flushes it to disk. The cask must not be used after Close() is called.
func (*BCStore) Keys ¶
Keys is a way to enumerate the keys in the key/value store and to optionally filter them based on a globbing expression. This cheats and uses superior knowledge that NetAuth uses only a single key namespace with a single layer of keys below it. Its technically possible to do something dumb with an entity or group name that includes a path seperator, but this should be filtered out at a higher level.
func (*BCStore) Put ¶
Put stores the bytes of v at a location identitified by the key k. If the operation fails an error will be returned explaining why.
func (*BCStore) SetEventFunc ¶
SetEventFunc sets up a function to call to fire events to subscribers.