Interface is the interface that must be implemented by a raft server.
| 4 | |
| 5 | // Interface is the interface that must be implemented by a raft server. |
| 6 | type Interface interface { |
| 7 | State() raft.RaftState |
| 8 | Peers() ([]string, error) |
| 9 | Close() error |
| 10 | IsLeader() bool |
| 11 | IsCandidate() bool |
| 12 | Leader() string |
| 13 | Apply(b []byte) error |
| 14 | AddServer(addr string) error |
| 15 | ShowDebugInfo(witch string) ([]byte, error) |
| 16 | UserSnapshot() error |
| 17 | Put(key, value []byte) error |
| 18 | Get(key []byte) ([]byte, error) |
| 19 | } |
no outgoing calls
no test coverage detected