add dependencies
This commit is contained in:
36
src/pbservice/common.go
Normal file
36
src/pbservice/common.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package pbservice
|
||||
|
||||
const (
|
||||
OK = "OK"
|
||||
ErrNoKey = "ErrNoKey"
|
||||
ErrWrongServer = "ErrWrongServer"
|
||||
)
|
||||
|
||||
type Err string
|
||||
|
||||
// Put or Append
|
||||
type PutAppendArgs struct {
|
||||
Key string
|
||||
Value string
|
||||
// You'll have to add definitions here.
|
||||
|
||||
// Field names must start with capital letters,
|
||||
// otherwise RPC will break.
|
||||
}
|
||||
|
||||
type PutAppendReply struct {
|
||||
Err Err
|
||||
}
|
||||
|
||||
type GetArgs struct {
|
||||
Key string
|
||||
// You'll have to add definitions here.
|
||||
}
|
||||
|
||||
type GetReply struct {
|
||||
Err Err
|
||||
Value string
|
||||
}
|
||||
|
||||
|
||||
// Your RPC definitions here.
|
||||
Reference in New Issue
Block a user