storage

package
v0.0.0-...-e8f0c1c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

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

func (*BadgerStorage) Update

func (b *BadgerStorage) Update(entries []sm.Entry) ([]sm.Entry, error)

type KVData

type KVData struct {
	Keys   StringSlice
	Values StringSlice
}

func (*KVData) IsNil

func (kv *KVData) IsNil() bool

func (*KVData) MarshalJSONObject

func (kv *KVData) MarshalJSONObject(enc *gojay.Encoder)

func (*KVData) NKeys

func (kv *KVData) NKeys() int

func (*KVData) UnmarshalJSONObject

func (kv *KVData) UnmarshalJSONObject(dec *gojay.Decoder, key string) error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL