fsm

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FSM

type FSM struct {
	ApplyFunc    func(log *raft.Log) interface{}
	SnapshotFunc func() (*Snapshot, error)
	RestoreFunc  func(closer io.ReadCloser) error
}

func (*FSM) Apply

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

func (*FSM) Restore

func (f *FSM) Restore(closer io.ReadCloser) error

func (*FSM) Snapshot

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

func (*FSM) Validate

func (f *FSM) Validate() error

type Snapshot

type Snapshot struct {
	PersistFunc func(sink raft.SnapshotSink) error
	ReleaseFunc func()
}

func (*Snapshot) Persist

func (s *Snapshot) Persist(sink raft.SnapshotSink) error

func (*Snapshot) Release

func (s *Snapshot) Release()

Jump to

Keyboard shortcuts

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