separate Put and Append in lab 4 kvsrv
This commit is contained in:
@@ -12,7 +12,6 @@ type Err string
|
|||||||
type PutAppendArgs struct {
|
type PutAppendArgs struct {
|
||||||
Key string
|
Key string
|
||||||
Value string
|
Value string
|
||||||
Op string // "Put" or "Append"
|
|
||||||
// You'll have to add definitions here.
|
// You'll have to add definitions here.
|
||||||
// Field names must start with capital letters,
|
// Field names must start with capital letters,
|
||||||
// otherwise RPC will break.
|
// otherwise RPC will break.
|
||||||
|
|||||||
@@ -43,7 +43,11 @@ func (kv *KVServer) Get(args *GetArgs, reply *GetReply) {
|
|||||||
|
|
||||||
// unlike in lab 2, neither Put nor Append should return a value.
|
// unlike in lab 2, neither Put nor Append should return a value.
|
||||||
// this is already reflected in the PutAppendReply struct.
|
// this is already reflected in the PutAppendReply struct.
|
||||||
func (kv *KVServer) PutAppend(args *PutAppendArgs, reply *PutAppendReply) {
|
func (kv *KVServer) Put(args *PutAppendArgs, reply *PutAppendReply) {
|
||||||
|
// Your code here.
|
||||||
|
}
|
||||||
|
|
||||||
|
func (kv *KVServer) Append(args *PutAppendArgs, reply *PutAppendReply) {
|
||||||
// Your code here.
|
// Your code here.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user