statemachine.go 269 B

123456789
  1. package raft
  2. // StateMachine is the interface for allowing the host application to save and
  3. // recovery the state machine. This makes it possible to make snapshots
  4. // and compact the log.
  5. type StateMachine interface {
  6. Save() ([]byte, error)
  7. Recovery([]byte) error
  8. }