2013-04-14 21:37:33 +00:00
|
|
|
package raft
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// Typedefs
|
|
|
|
//
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// A command represents an action to be taken on the replicated state machine.
|
|
|
|
type Command interface {
|
2013-04-28 04:51:17 +00:00
|
|
|
CommandName() string
|
2013-04-28 22:36:46 +00:00
|
|
|
Validate(server *Server) error
|
|
|
|
Apply(server *Server)
|
2013-04-14 21:37:33 +00:00
|
|
|
}
|