2013-07-11 05:20:21 +00:00
|
|
|
package raft
|
|
|
|
|
2013-07-17 13:45:53 +00:00
|
|
|
import (
|
|
|
|
"io"
|
|
|
|
)
|
2013-07-11 05:20:21 +00:00
|
|
|
|
|
|
|
// NOP command
|
|
|
|
type NOPCommand struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
// The name of the NOP command in the log
|
|
|
|
func (c NOPCommand) CommandName() string {
|
2013-07-25 21:26:27 +00:00
|
|
|
return "raft:nop"
|
2013-07-11 05:20:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (c NOPCommand) Apply(server *Server) (interface{}, error) {
|
|
|
|
return nil, nil
|
|
|
|
}
|
2013-07-17 13:45:53 +00:00
|
|
|
|
|
|
|
func (c NOPCommand) Encode(w io.Writer) error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c NOPCommand) Decode(r io.Reader) error {
|
|
|
|
return nil
|
|
|
|
}
|