statemachine.go 384 B

1234567891011121314
  1. package raft
  2. //------------------------------------------------------------------------------
  3. //
  4. // Typedefs
  5. //
  6. //------------------------------------------------------------------------------
  7. // StateMachine is the interface for allowing the host application to save and
  8. // recovery the state machine
  9. type StateMachine interface {
  10. Save() ([]byte, error)
  11. Recovery([]byte) error
  12. }