Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadSnapshot ¶ added in v1.9.0
func ReadSnapshot(r io.Reader, handler func(header *SnapshotHeader, msg structs.MessageType, dec *codec.Decoder) error) error
ReadSnapshot decodes each message type and utilizes the handler function to process each message type individually
Types ¶
type Deps ¶ added in v1.9.0
type Deps struct { // Logger used to emit log messages Logger hclog.Logger // NewStateStore returns a state.Store which the FSM will use to make changes // to the state. // NewStateStore will be called once when the FSM is created and again any // time Restore() is called. NewStateStore func() *state.Store }
Deps are dependencies used to construct the FSM.
type FSM ¶
type FSM struct {
// contains filtered or unexported fields
}
FSM implements a finite state machine that is used along with Raft to provide strong consistency. We implement this outside the Server to avoid exposing this outside the package.
func New
deprecated
func New(gc *state.TombstoneGC, logger hclog.Logger) (*FSM, error)
New is used to construct a new FSM with a blank state.
Deprecated: use NewFromDeps.
func NewFromDeps ¶ added in v1.9.0
NewFromDeps creates a new FSM from its dependencies.
func (*FSM) ChunkingFSM ¶ added in v1.5.3
func (c *FSM) ChunkingFSM() *raftchunking.ChunkingFSM
type SnapshotHeader ¶ added in v1.9.0
type SnapshotHeader struct { // LastIndex is the last index that affects the data. // This is used when we do the restore for watchers. LastIndex uint64 }
SnapshotHeader is the first entry in our snapshot
Click to show internal directories.
Click to hide internal directories.