Documentation ¶
Index ¶
Constants ¶
View Source
const ( OK = "OK" ErrNoKey = "ErrNoKey" ErrWrongGroup = "ErrWrongGroup" )
View Source
const Debug = 0
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Clerk ¶
type Clerk struct {
// contains filtered or unexported fields
}
type DisKV ¶
type DisKV struct {
// contains filtered or unexported fields
}
func StartServer ¶
func StartServer(gid int64, shardmasters []string, servers []string, me int, dir string, restart bool) *DisKV
Start a shardkv server. gid is the ID of the server's replica group. shardmasters[] contains the ports of the
servers that implement the shardmaster.
servers[] contains the ports of the servers
in this replica group.
Me is the index of this server in servers[]. dir is the directory name under which this
replica should store all its files. each replica is passed a different directory.
restart is false the very first time this server
is started, and true to indicate a re-start after a crash or after a crash with disk loss.
func (*DisKV) PutAppend ¶
func (kv *DisKV) PutAppend(args *PutAppendArgs, reply *PutAppendReply) error
RPC handler for client Put and Append requests
func (*DisKV) Setunreliable ¶
please do not change these two functions.
type PutAppendArgs ¶
type PutAppendReply ¶
type PutAppendReply struct {
Err Err
}
Click to show internal directories.
Click to hide internal directories.