Versions in this module Expand all Collapse all v1 v1.0.0 Sep 5, 2020 Changes in this version + const CommitTimeout + const Debug + const ErrNoKey + const ErrWrongLeader + const NoKeyValue + const OK + const OpAppend + const OpGet + const OpPut + const RPCGet + const RPCPutAppend + func DPrintf(format string, a ...interface{}) (n int, err error) + func GetClientEnds(path string) []*rpcutil.ClientEnd + type Clerk struct + func MakeClerk(servers []*rpcutil.ClientEnd) *Clerk + func (ck *Clerk) Append(key string, value string) + func (ck *Clerk) Get(key string) string + func (ck *Clerk) Put(key string, value string) + type ClientConfig struct + ClientEnd []struct{ ... } + type CommonReply struct + Err Err + Key string + Serial *uuid.UUID + Value string + type Err string + type GetArgs struct + Id uuid.UUID + Key string + Serial uuid.UUID + type GetReply struct + Err Err + Value string + type KVServer struct + func StartKVServer(servers []*rpcutil.ClientEnd, me int, persister *raft.Persister, ...) *KVServer + func (kv *KVServer) Get(args *GetArgs, reply *GetReply) error + func (kv *KVServer) Kill() + func (kv *KVServer) PutAppend(args *PutAppendArgs, reply *PutAppendReply) error + type Op struct + Key string + Serial uuid.UUID + Type string + Value string + type PutAppendArgs struct + Id uuid.UUID + Key string + Op string + Serial uuid.UUID + Value string + type PutAppendReply struct + Err Err