Documentation ¶
Index ¶
- Constants
- func MakeCompositeKey(prefix, key string) []byte
- func MakeCompositeKeyString(prefix, key string) string
- type LevelDBState
- func (s *LevelDBState) Delete(key string) error
- func (s *LevelDBState) Get(key string) ([]byte, error)
- func (s *LevelDBState) GetOrError(key string) ([]byte, error)
- func (s *LevelDBState) LoadOffset() (uint64, error)
- func (s *LevelDBState) NewStateFromOld(stateDbPath string) (State, string, error)
- func (s *LevelDBState) Reset(stateDbPath string) (string, error)
- func (s *LevelDBState) SaveOffset(offset uint64) error
- func (s *LevelDBState) Set(key string, value []byte) error
- type State
Constants ¶
View Source
const (
OffsetKey = "offset"
)
Variables ¶
This section is empty.
Functions ¶
func MakeCompositeKey ¶
func MakeCompositeKeyString ¶
Types ¶
type LevelDBState ¶
func NewLevelDBState ¶
func NewLevelDBState(stateDbPath string, topic string) (*LevelDBState, error)
func (*LevelDBState) Delete ¶
func (s *LevelDBState) Delete(key string) error
func (*LevelDBState) GetOrError ¶
func (s *LevelDBState) GetOrError(key string) ([]byte, error)
func (*LevelDBState) LoadOffset ¶
func (s *LevelDBState) LoadOffset() (uint64, error)
func (*LevelDBState) NewStateFromOld ¶
func (s *LevelDBState) NewStateFromOld(stateDbPath string) (State, string, error)
func (*LevelDBState) Reset ¶
func (s *LevelDBState) Reset(stateDbPath string) (string, error)
Reset creates new underlying leveldb storage
func (*LevelDBState) SaveOffset ¶
func (s *LevelDBState) SaveOffset(offset uint64) error
type State ¶
type State interface { Get(key string) ([]byte, error) Set(key string, value []byte) error Delete(key string) error Reset(stateDbPath string) (string, error) SaveOffset(uint64) error LoadOffset() (uint64, error) GetOrError(key string) ([]byte, error) }
State is the node's state (it keeps the offset, the signatures and the Operation pool.
Click to show internal directories.
Click to hide internal directories.