fsm

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: MPL-2.0 Imports: 13 Imported by: 39

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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

func New(gc *state.TombstoneGC, logOutput io.Writer) (*FSM, error)

New is used to construct a new FSM with a blank state.

func (*FSM) Apply

func (c *FSM) Apply(log *raft.Log) interface{}

func (*FSM) ChunkingFSM added in v1.5.3

func (c *FSM) ChunkingFSM() *raftchunking.ChunkingFSM

func (*FSM) Restore

func (c *FSM) Restore(old io.ReadCloser) error

Restore streams in the snapshot and replaces the current state store with a new one based on the snapshot if all goes OK during the restore.

func (*FSM) Snapshot

func (c *FSM) Snapshot() (raft.FSMSnapshot, error)

func (*FSM) State

func (c *FSM) State() *state.Store

State is used to return a handle to the current state

Jump to

Keyboard shortcuts

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