Documentation ¶
Index ¶
- func NewBadgerStorage(clusterID, nodeID uint64) sm.IOnDiskStateMachine
- type BadgerStorage
- func (b *BadgerStorage) Close() error
- func (b *BadgerStorage) Lookup(key interface{}) (interface{}, error)
- func (b *BadgerStorage) Open(stopc <-chan struct{}) (uint64, error)
- func (b *BadgerStorage) PrepareSnapshot() (interface{}, error)
- func (b *BadgerStorage) RecoverFromSnapshot(reader io.Reader, i <-chan struct{}) error
- func (b *BadgerStorage) SaveSnapshot(ctx interface{}, writer io.Writer, i2 <-chan struct{}) error
- func (b *BadgerStorage) Sync() error
- func (b *BadgerStorage) Update(entries []sm.Entry) ([]sm.Entry, error)
- type KVData
- type StringSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBadgerStorage ¶
func NewBadgerStorage(clusterID, nodeID uint64) sm.IOnDiskStateMachine
Types ¶
type BadgerStorage ¶
type BadgerStorage struct {
// contains filtered or unexported fields
}
func (*BadgerStorage) Close ¶
func (b *BadgerStorage) Close() error
func (*BadgerStorage) Lookup ¶
func (b *BadgerStorage) Lookup(key interface{}) (interface{}, error)
func (*BadgerStorage) Open ¶
func (b *BadgerStorage) Open(stopc <-chan struct{}) (uint64, error)
func (*BadgerStorage) PrepareSnapshot ¶
func (b *BadgerStorage) PrepareSnapshot() (interface{}, error)
func (*BadgerStorage) RecoverFromSnapshot ¶
func (b *BadgerStorage) RecoverFromSnapshot(reader io.Reader, i <-chan struct{}) error
func (*BadgerStorage) SaveSnapshot ¶
func (b *BadgerStorage) SaveSnapshot(ctx interface{}, writer io.Writer, i2 <-chan struct{}) error
func (*BadgerStorage) Sync ¶
func (b *BadgerStorage) Sync() error
type KVData ¶
type KVData struct { Keys StringSlice Values StringSlice }
func (*KVData) MarshalJSONObject ¶
type StringSlice ¶
type StringSlice []string
func (*StringSlice) IsNil ¶
func (t *StringSlice) IsNil() bool
func (*StringSlice) MarshalJSONArray ¶
func (t *StringSlice) MarshalJSONArray(enc *gojay.Encoder)
func (*StringSlice) UnmarshalJSONArray ¶
func (t *StringSlice) UnmarshalJSONArray(dec *gojay.Decoder) error
Click to show internal directories.
Click to hide internal directories.