Documentation ¶
Index ¶
- func NewStateStore(logger logger.Logger, homeDir string, ssConfig config.StateStoreConfig) (types.StateStore, error)
- func RecoverStateStore(logger logger.Logger, changelogPath string, stateStore types.StateStore) error
- func RegisterBackend(backendType BackendType, initializer BackendInitializer)
- type BackendInitializer
- type BackendType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStateStore ¶ added in v0.0.23
func NewStateStore(logger logger.Logger, homeDir string, ssConfig config.StateStoreConfig) (types.StateStore, error)
NewStateStore Create a new state store with the specified backend type
func RecoverStateStore ¶ added in v0.0.23
func RecoverStateStore(logger logger.Logger, changelogPath string, stateStore types.StateStore) error
RecoverStateStore will be called during initialization to recover the state from rlog
func RegisterBackend ¶ added in v0.0.8
func RegisterBackend(backendType BackendType, initializer BackendInitializer)
Types ¶
type BackendInitializer ¶ added in v0.0.8
type BackendInitializer func(dir string, config config.StateStoreConfig) (types.StateStore, error)
type BackendType ¶ added in v0.0.8
type BackendType string
const ( // RocksDBBackend represents rocksdb // - use rocksdb build tag RocksDBBackend BackendType = "rocksdb" // PebbleDBBackend represents pebbledb PebbleDBBackend BackendType = "pebbledb" // SQLiteBackend represents sqlite SQLiteBackend BackendType = "sqlite" )
Click to show internal directories.
Click to hide internal directories.