Documentation ¶
Index ¶
Constants ¶
View Source
const ( OK = "OK" ErrNoKey = "ErrNoKey" Abort = "Abort" )
Error Strings
View Source
const ( Get = iota Put Append )
Command Constants
View Source
const Debug = 0
Debug toggles print logs
View Source
const PrintBool = false
PrintBool toggles debugging logs
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Clerk ¶
type Clerk struct {
// contains filtered or unexported fields
}
Clerk struct for client
type Op ¶
type Op struct { Command int Key string Value string RequestID int64 ClientID int64 Result string Err string Index int }
Op passed to raft.go for processing
type PutAppendArgs ¶
PutAppendArgs args for PutAppend RPC Call
type PutAppendReply ¶
PutAppendReply reply for PutAppend RPC Call
type RaftKV ¶
type RaftKV struct {
// contains filtered or unexported fields
}
RaftKV struct for server
func StartKVServer ¶
func StartKVServer(servers []*labrpc.ClientEnd, me int, persister *raft.Persister, maxraftstate int) *RaftKV
StartKVServer starts server
func (*RaftKV) PutAppend ¶
func (kv *RaftKV) PutAppend(args *PutAppendArgs, reply *PutAppendReply)
PutAppend RPC Call
Click to show internal directories.
Click to hide internal directories.