Versions in this module Expand all Collapse all v1 v1.0.0 Jul 19, 2024 Changes in this version + const ConcurrentStateMachine + const OnDiskStateMachine + const RegularStateMachine + var ErrNotImplemented = errors.New("requested feature not implemented") + var ErrOpenStopped = errors.New("open method did not complete") + var ErrSnapshotAborted = errors.New("snapshot aborted") + var ErrSnapshotStopped = errors.New("snapshot stopped") + var ErrSnapshotStreaming = errors.New("failed to stream the snapshot") + type CreateConcurrentStateMachineFunc func(uint64, uint64) IConcurrentStateMachine + type CreateOnDiskStateMachineFunc func(shardID uint64, replicaID uint64) IOnDiskStateMachine + type CreateStateMachineFunc func(shardID uint64, replicaID uint64) IStateMachine + type Entry struct + Cmd []byte + Index uint64 + Result Result + type IConcurrentStateMachine interface + Close func() error + Lookup func(interface{}) (interface{}, error) + PrepareSnapshot func() (interface{}, error) + RecoverFromSnapshot func(io.Reader, []SnapshotFile, <-chan struct{}) error + SaveSnapshot func(interface{}, io.Writer, ISnapshotFileCollection, <-chan struct{}) error + Update func([]Entry) ([]Entry, error) + type IExtended interface + NALookup func([]byte) ([]byte, error) + type IHash interface + GetHash func() (uint64, error) + type IOnDiskStateMachine interface + Close func() error + Lookup func(interface{}) (interface{}, error) + Open func(stopc <-chan struct{}) (uint64, error) + PrepareSnapshot func() (interface{}, error) + RecoverFromSnapshot func(io.Reader, <-chan struct{}) error + SaveSnapshot func(interface{}, io.Writer, <-chan struct{}) error + Sync func() error + Update func([]Entry) ([]Entry, error) + type ISnapshotFileCollection interface + AddFile func(fileID uint64, path string, metadata []byte) + type IStateMachine interface + Close func() error + Lookup func(interface{}) (interface{}, error) + RecoverFromSnapshot func(io.Reader, []SnapshotFile, <-chan struct{}) error + SaveSnapshot func(io.Writer, ISnapshotFileCollection, <-chan struct{}) error + Update func(Entry) (Result, error) + type Result struct + Data []byte + Value uint64 + type SnapshotFile struct + FileID uint64 + Filepath string + Metadata []byte + type Type uint64 Other modules containing this package github.com/foreeest/dragonboat/v2