Documentation ¶
Index ¶
- type Command
- type Kv
- func (k *Kv) Apply(log *raft.Log) interface{}
- func (k *Kv) Close()
- func (k *Kv) Delete(key []byte) error
- func (k *Kv) Get(key []byte) ([]byte, error)
- func (k *Kv) GetLeader() (bool, string)
- func (k *Kv) Join(nodeId string, nodeAddr string) error
- func (k *Kv) Restore(rc io.ReadCloser) error
- func (k *Kv) Set(key []byte, val []byte) error
- func (k *Kv) Snapshot() (raft.FSMSnapshot, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Kv ¶
type Kv struct { Dir string Id string Addr string Peers map[string]string Raft *raft.Raft Db *db.Kv }
Click to show internal directories.
Click to hide internal directories.