Documentation ¶
Index ¶
- Variables
- func RegisterClientServer(s *grpc.Server, srv ClientServer)
- func RegisterHealthServer(s *grpc.Server, srv HealthServer)
- func RegisterKVStoreServer(s *grpc.Server, srv KVStoreServer)
- type Address
- func (*Address) Descriptor() ([]byte, []int)
- func (m *Address) GetHost() string
- func (m *Address) GetPort() uint32
- func (m *Address) Marshal() (dAtA []byte, err error)
- func (m *Address) MarshalTo(dAtA []byte) (int, error)
- func (*Address) ProtoMessage()
- func (m *Address) Reset()
- func (m *Address) Size() (n int)
- func (m *Address) String() string
- func (m *Address) Unmarshal(dAtA []byte) error
- func (m *Address) XXX_DiscardUnknown()
- func (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Address) XXX_Merge(src proto.Message)
- func (m *Address) XXX_Size() int
- func (m *Address) XXX_Unmarshal(b []byte) error
- type ClientClient
- type ClientCmdReq
- func (*ClientCmdReq) Descriptor() ([]byte, []int)
- func (m *ClientCmdReq) GetClientId() uint64
- func (m *ClientCmdReq) GetCommand() isClientCmdReq_Command
- func (m *ClientCmdReq) GetDelReq() *DelReq
- func (m *ClientCmdReq) GetPutReq() *PutReq
- func (m *ClientCmdReq) GetSequenceNumber() uint64
- func (m *ClientCmdReq) Marshal() (dAtA []byte, err error)
- func (m *ClientCmdReq) MarshalTo(dAtA []byte) (int, error)
- func (*ClientCmdReq) ProtoMessage()
- func (m *ClientCmdReq) Reset()
- func (m *ClientCmdReq) Size() (n int)
- func (m *ClientCmdReq) String() string
- func (m *ClientCmdReq) Unmarshal(dAtA []byte) error
- func (m *ClientCmdReq) XXX_DiscardUnknown()
- func (m *ClientCmdReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClientCmdReq) XXX_Merge(src proto.Message)
- func (*ClientCmdReq) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- func (m *ClientCmdReq) XXX_Size() int
- func (m *ClientCmdReq) XXX_Unmarshal(b []byte) error
- type ClientCmdReq_DelReq
- type ClientCmdReq_PutReq
- type ClientCmdRes
- func (*ClientCmdRes) Descriptor() ([]byte, []int)
- func (m *ClientCmdRes) GetDelRes() *DelRes
- func (m *ClientCmdRes) GetLeaderHint() *Address
- func (m *ClientCmdRes) GetPutRes() *PutRes
- func (m *ClientCmdRes) GetResponse() isClientCmdRes_Response
- func (m *ClientCmdRes) GetStatus() ClientRpcStatus
- func (m *ClientCmdRes) Marshal() (dAtA []byte, err error)
- func (m *ClientCmdRes) MarshalTo(dAtA []byte) (int, error)
- func (*ClientCmdRes) ProtoMessage()
- func (m *ClientCmdRes) Reset()
- func (m *ClientCmdRes) Size() (n int)
- func (m *ClientCmdRes) String() string
- func (m *ClientCmdRes) Unmarshal(dAtA []byte) error
- func (m *ClientCmdRes) XXX_DiscardUnknown()
- func (m *ClientCmdRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClientCmdRes) XXX_Merge(src proto.Message)
- func (*ClientCmdRes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- func (m *ClientCmdRes) XXX_Size() int
- func (m *ClientCmdRes) XXX_Unmarshal(b []byte) error
- type ClientCmdRes_DelRes
- type ClientCmdRes_PutRes
- type ClientQueryReq
- func (*ClientQueryReq) Descriptor() ([]byte, []int)
- func (m *ClientQueryReq) GetGetReq() *GetReq
- func (m *ClientQueryReq) GetQuery() isClientQueryReq_Query
- func (m *ClientQueryReq) Marshal() (dAtA []byte, err error)
- func (m *ClientQueryReq) MarshalTo(dAtA []byte) (int, error)
- func (*ClientQueryReq) ProtoMessage()
- func (m *ClientQueryReq) Reset()
- func (m *ClientQueryReq) Size() (n int)
- func (m *ClientQueryReq) String() string
- func (m *ClientQueryReq) Unmarshal(dAtA []byte) error
- func (m *ClientQueryReq) XXX_DiscardUnknown()
- func (m *ClientQueryReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClientQueryReq) XXX_Merge(src proto.Message)
- func (*ClientQueryReq) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- func (m *ClientQueryReq) XXX_Size() int
- func (m *ClientQueryReq) XXX_Unmarshal(b []byte) error
- type ClientQueryReq_GetReq
- type ClientQueryRes
- func (*ClientQueryRes) Descriptor() ([]byte, []int)
- func (m *ClientQueryRes) GetLeaderHint() *Address
- func (m *ClientQueryRes) GetResult() isClientQueryRes_Result
- func (m *ClientQueryRes) GetStatus() ClientRpcStatus
- func (m *ClientQueryRes) GetValue() *Value
- func (m *ClientQueryRes) Marshal() (dAtA []byte, err error)
- func (m *ClientQueryRes) MarshalTo(dAtA []byte) (int, error)
- func (*ClientQueryRes) ProtoMessage()
- func (m *ClientQueryRes) Reset()
- func (m *ClientQueryRes) Size() (n int)
- func (m *ClientQueryRes) String() string
- func (m *ClientQueryRes) Unmarshal(dAtA []byte) error
- func (m *ClientQueryRes) XXX_DiscardUnknown()
- func (m *ClientQueryRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClientQueryRes) XXX_Merge(src proto.Message)
- func (*ClientQueryRes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- func (m *ClientQueryRes) XXX_Size() int
- func (m *ClientQueryRes) XXX_Unmarshal(b []byte) error
- type ClientQueryRes_Value
- type ClientRpcStatus
- type ClientServer
- type DelReq
- func (*DelReq) Descriptor() ([]byte, []int)
- func (m *DelReq) GetKey() string
- func (m *DelReq) Marshal() (dAtA []byte, err error)
- func (m *DelReq) MarshalTo(dAtA []byte) (int, error)
- func (*DelReq) ProtoMessage()
- func (m *DelReq) Reset()
- func (m *DelReq) Size() (n int)
- func (m *DelReq) String() string
- func (m *DelReq) Unmarshal(dAtA []byte) error
- func (m *DelReq) XXX_DiscardUnknown()
- func (m *DelReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DelReq) XXX_Merge(src proto.Message)
- func (m *DelReq) XXX_Size() int
- func (m *DelReq) XXX_Unmarshal(b []byte) error
- type DelRes
- func (*DelRes) Descriptor() ([]byte, []int)
- func (m *DelRes) GetOk() bool
- func (m *DelRes) Marshal() (dAtA []byte, err error)
- func (m *DelRes) MarshalTo(dAtA []byte) (int, error)
- func (*DelRes) ProtoMessage()
- func (m *DelRes) Reset()
- func (m *DelRes) Size() (n int)
- func (m *DelRes) String() string
- func (m *DelRes) Unmarshal(dAtA []byte) error
- func (m *DelRes) XXX_DiscardUnknown()
- func (m *DelRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DelRes) XXX_Merge(src proto.Message)
- func (m *DelRes) XXX_Size() int
- func (m *DelRes) XXX_Unmarshal(b []byte) error
- type GetReq
- func (*GetReq) Descriptor() ([]byte, []int)
- func (m *GetReq) GetKey() string
- func (m *GetReq) Marshal() (dAtA []byte, err error)
- func (m *GetReq) MarshalTo(dAtA []byte) (int, error)
- func (*GetReq) ProtoMessage()
- func (m *GetReq) Reset()
- func (m *GetReq) Size() (n int)
- func (m *GetReq) String() string
- func (m *GetReq) Unmarshal(dAtA []byte) error
- func (m *GetReq) XXX_DiscardUnknown()
- func (m *GetReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetReq) XXX_Merge(src proto.Message)
- func (m *GetReq) XXX_Size() int
- func (m *GetReq) XXX_Unmarshal(b []byte) error
- type HealthCheckRequest
- func (*HealthCheckRequest) Descriptor() ([]byte, []int)
- func (m *HealthCheckRequest) GetService() string
- func (m *HealthCheckRequest) Marshal() (dAtA []byte, err error)
- func (m *HealthCheckRequest) MarshalTo(dAtA []byte) (int, error)
- func (*HealthCheckRequest) ProtoMessage()
- func (m *HealthCheckRequest) Reset()
- func (m *HealthCheckRequest) Size() (n int)
- func (m *HealthCheckRequest) String() string
- func (m *HealthCheckRequest) Unmarshal(dAtA []byte) error
- func (m *HealthCheckRequest) XXX_DiscardUnknown()
- func (m *HealthCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HealthCheckRequest) XXX_Merge(src proto.Message)
- func (m *HealthCheckRequest) XXX_Size() int
- func (m *HealthCheckRequest) XXX_Unmarshal(b []byte) error
- type HealthCheckResponse
- func (*HealthCheckResponse) Descriptor() ([]byte, []int)
- func (m *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus
- func (m *HealthCheckResponse) Marshal() (dAtA []byte, err error)
- func (m *HealthCheckResponse) MarshalTo(dAtA []byte) (int, error)
- func (*HealthCheckResponse) ProtoMessage()
- func (m *HealthCheckResponse) Reset()
- func (m *HealthCheckResponse) Size() (n int)
- func (m *HealthCheckResponse) String() string
- func (m *HealthCheckResponse) Unmarshal(dAtA []byte) error
- func (m *HealthCheckResponse) XXX_DiscardUnknown()
- func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HealthCheckResponse) XXX_Merge(src proto.Message)
- func (m *HealthCheckResponse) XXX_Size() int
- func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error
- type HealthCheckResponse_ServingStatus
- type HealthClient
- type HealthServer
- type KVStoreClient
- type KVStoreServer
- type PutReq
- func (*PutReq) Descriptor() ([]byte, []int)
- func (m *PutReq) GetKey() string
- func (m *PutReq) GetValue() []byte
- func (m *PutReq) Marshal() (dAtA []byte, err error)
- func (m *PutReq) MarshalTo(dAtA []byte) (int, error)
- func (*PutReq) ProtoMessage()
- func (m *PutReq) Reset()
- func (m *PutReq) Size() (n int)
- func (m *PutReq) String() string
- func (m *PutReq) Unmarshal(dAtA []byte) error
- func (m *PutReq) XXX_DiscardUnknown()
- func (m *PutReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PutReq) XXX_Merge(src proto.Message)
- func (m *PutReq) XXX_Size() int
- func (m *PutReq) XXX_Unmarshal(b []byte) error
- type PutRes
- func (*PutRes) Descriptor() ([]byte, []int)
- func (m *PutRes) GetSuccess() bool
- func (m *PutRes) Marshal() (dAtA []byte, err error)
- func (m *PutRes) MarshalTo(dAtA []byte) (int, error)
- func (*PutRes) ProtoMessage()
- func (m *PutRes) Reset()
- func (m *PutRes) Size() (n int)
- func (m *PutRes) String() string
- func (m *PutRes) Unmarshal(dAtA []byte) error
- func (m *PutRes) XXX_DiscardUnknown()
- func (m *PutRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PutRes) XXX_Merge(src proto.Message)
- func (m *PutRes) XXX_Size() int
- func (m *PutRes) XXX_Unmarshal(b []byte) error
- type RegisterClientReq
- func (*RegisterClientReq) Descriptor() ([]byte, []int)
- func (m *RegisterClientReq) Marshal() (dAtA []byte, err error)
- func (m *RegisterClientReq) MarshalTo(dAtA []byte) (int, error)
- func (*RegisterClientReq) ProtoMessage()
- func (m *RegisterClientReq) Reset()
- func (m *RegisterClientReq) Size() (n int)
- func (m *RegisterClientReq) String() string
- func (m *RegisterClientReq) Unmarshal(dAtA []byte) error
- func (m *RegisterClientReq) XXX_DiscardUnknown()
- func (m *RegisterClientReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RegisterClientReq) XXX_Merge(src proto.Message)
- func (m *RegisterClientReq) XXX_Size() int
- func (m *RegisterClientReq) XXX_Unmarshal(b []byte) error
- type RegisterClientRes
- func (*RegisterClientRes) Descriptor() ([]byte, []int)
- func (m *RegisterClientRes) GetClientId() uint64
- func (m *RegisterClientRes) GetLeaderHint() *Address
- func (m *RegisterClientRes) GetStatus() ClientRpcStatus
- func (m *RegisterClientRes) Marshal() (dAtA []byte, err error)
- func (m *RegisterClientRes) MarshalTo(dAtA []byte) (int, error)
- func (*RegisterClientRes) ProtoMessage()
- func (m *RegisterClientRes) Reset()
- func (m *RegisterClientRes) Size() (n int)
- func (m *RegisterClientRes) String() string
- func (m *RegisterClientRes) Unmarshal(dAtA []byte) error
- func (m *RegisterClientRes) XXX_DiscardUnknown()
- func (m *RegisterClientRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RegisterClientRes) XXX_Merge(src proto.Message)
- func (m *RegisterClientRes) XXX_Size() int
- func (m *RegisterClientRes) XXX_Unmarshal(b []byte) error
- type Value
- func (*Value) Descriptor() ([]byte, []int)
- func (m *Value) GetKey() string
- func (m *Value) GetValue() []byte
- func (m *Value) Marshal() (dAtA []byte, err error)
- func (m *Value) MarshalTo(dAtA []byte) (int, error)
- func (*Value) ProtoMessage()
- func (m *Value) Reset()
- func (m *Value) Size() (n int)
- func (m *Value) String() string
- func (m *Value) Unmarshal(dAtA []byte) error
- func (m *Value) XXX_DiscardUnknown()
- func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Value) XXX_Merge(src proto.Message)
- func (m *Value) XXX_Size() int
- func (m *Value) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthHealthcheck = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowHealthcheck = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthKvClientApi = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowKvClientApi = fmt.Errorf("proto: integer overflow") )
var ClientRpcStatus_name = map[int32]string{
0: "OK",
1: "NOT_LEADER",
}
var ClientRpcStatus_value = map[string]int32{
"OK": 0,
"NOT_LEADER": 1,
}
var HealthCheckResponse_ServingStatus_name = map[int32]string{
0: "UNKNOWN",
1: "SERVING",
2: "NOT_SERVING",
}
var HealthCheckResponse_ServingStatus_value = map[string]int32{
"UNKNOWN": 0,
"SERVING": 1,
"NOT_SERVING": 2,
}
Functions ¶
func RegisterClientServer ¶
func RegisterClientServer(s *grpc.Server, srv ClientServer)
func RegisterHealthServer ¶
func RegisterHealthServer(s *grpc.Server, srv HealthServer)
func RegisterKVStoreServer ¶
func RegisterKVStoreServer(s *grpc.Server, srv KVStoreServer)
Types ¶
type Address ¶
type Address struct { Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Address) Descriptor ¶
func (*Address) ProtoMessage ¶
func (*Address) ProtoMessage()
func (*Address) XXX_DiscardUnknown ¶
func (m *Address) XXX_DiscardUnknown()
func (*Address) XXX_Marshal ¶
func (*Address) XXX_Unmarshal ¶
type ClientClient ¶
type ClientClient interface { RegisterClient(ctx context.Context, in *RegisterClientReq, opts ...grpc.CallOption) (*RegisterClientRes, error) ExecuteCmd(ctx context.Context, in *ClientCmdReq, opts ...grpc.CallOption) (*ClientCmdRes, error) Query(ctx context.Context, in *ClientQueryReq, opts ...grpc.CallOption) (*ClientQueryRes, error) }
ClientClient is the client API for Client service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewClientClient ¶
func NewClientClient(cc *grpc.ClientConn) ClientClient
type ClientCmdReq ¶
type ClientCmdReq struct { ClientId uint64 `protobuf:"varint,1,opt,name=clientId,proto3" json:"clientId,omitempty"` SequenceNumber uint64 `protobuf:"varint,2,opt,name=sequenceNumber,proto3" json:"sequenceNumber,omitempty"` // Types that are valid to be assigned to Command: // *ClientCmdReq_PutReq // *ClientCmdReq_DelReq Command isClientCmdReq_Command `protobuf_oneof:"command"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ClientCmdReq) Descriptor ¶
func (*ClientCmdReq) Descriptor() ([]byte, []int)
func (*ClientCmdReq) GetClientId ¶
func (m *ClientCmdReq) GetClientId() uint64
func (*ClientCmdReq) GetCommand ¶
func (m *ClientCmdReq) GetCommand() isClientCmdReq_Command
func (*ClientCmdReq) GetDelReq ¶
func (m *ClientCmdReq) GetDelReq() *DelReq
func (*ClientCmdReq) GetPutReq ¶
func (m *ClientCmdReq) GetPutReq() *PutReq
func (*ClientCmdReq) GetSequenceNumber ¶
func (m *ClientCmdReq) GetSequenceNumber() uint64
func (*ClientCmdReq) Marshal ¶
func (m *ClientCmdReq) Marshal() (dAtA []byte, err error)
func (*ClientCmdReq) ProtoMessage ¶
func (*ClientCmdReq) ProtoMessage()
func (*ClientCmdReq) Reset ¶
func (m *ClientCmdReq) Reset()
func (*ClientCmdReq) Size ¶
func (m *ClientCmdReq) Size() (n int)
func (*ClientCmdReq) String ¶
func (m *ClientCmdReq) String() string
func (*ClientCmdReq) Unmarshal ¶
func (m *ClientCmdReq) Unmarshal(dAtA []byte) error
func (*ClientCmdReq) XXX_DiscardUnknown ¶
func (m *ClientCmdReq) XXX_DiscardUnknown()
func (*ClientCmdReq) XXX_Marshal ¶
func (m *ClientCmdReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ClientCmdReq) XXX_Merge ¶
func (m *ClientCmdReq) XXX_Merge(src proto.Message)
func (*ClientCmdReq) XXX_OneofFuncs ¶
func (*ClientCmdReq) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
func (*ClientCmdReq) XXX_Size ¶
func (m *ClientCmdReq) XXX_Size() int
func (*ClientCmdReq) XXX_Unmarshal ¶
func (m *ClientCmdReq) XXX_Unmarshal(b []byte) error
type ClientCmdReq_DelReq ¶
type ClientCmdReq_DelReq struct {
DelReq *DelReq `protobuf:"bytes,4,opt,name=delReq,proto3,oneof"`
}
func (*ClientCmdReq_DelReq) MarshalTo ¶
func (m *ClientCmdReq_DelReq) MarshalTo(dAtA []byte) (int, error)
func (*ClientCmdReq_DelReq) Size ¶
func (m *ClientCmdReq_DelReq) Size() (n int)
type ClientCmdReq_PutReq ¶
type ClientCmdReq_PutReq struct {
PutReq *PutReq `protobuf:"bytes,3,opt,name=putReq,proto3,oneof"`
}
func (*ClientCmdReq_PutReq) MarshalTo ¶
func (m *ClientCmdReq_PutReq) MarshalTo(dAtA []byte) (int, error)
func (*ClientCmdReq_PutReq) Size ¶
func (m *ClientCmdReq_PutReq) Size() (n int)
type ClientCmdRes ¶
type ClientCmdRes struct { Status ClientRpcStatus `protobuf:"varint,1,opt,name=status,proto3,enum=kv_client.ClientRpcStatus" json:"status,omitempty"` LeaderHint *Address `protobuf:"bytes,2,opt,name=leaderHint,proto3" json:"leaderHint,omitempty"` // Types that are valid to be assigned to Response: // *ClientCmdRes_PutRes // *ClientCmdRes_DelRes Response isClientCmdRes_Response `protobuf_oneof:"response"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ClientCmdRes) Descriptor ¶
func (*ClientCmdRes) Descriptor() ([]byte, []int)
func (*ClientCmdRes) GetDelRes ¶
func (m *ClientCmdRes) GetDelRes() *DelRes
func (*ClientCmdRes) GetLeaderHint ¶
func (m *ClientCmdRes) GetLeaderHint() *Address
func (*ClientCmdRes) GetPutRes ¶
func (m *ClientCmdRes) GetPutRes() *PutRes
func (*ClientCmdRes) GetResponse ¶
func (m *ClientCmdRes) GetResponse() isClientCmdRes_Response
func (*ClientCmdRes) GetStatus ¶
func (m *ClientCmdRes) GetStatus() ClientRpcStatus
func (*ClientCmdRes) Marshal ¶
func (m *ClientCmdRes) Marshal() (dAtA []byte, err error)
func (*ClientCmdRes) ProtoMessage ¶
func (*ClientCmdRes) ProtoMessage()
func (*ClientCmdRes) Reset ¶
func (m *ClientCmdRes) Reset()
func (*ClientCmdRes) Size ¶
func (m *ClientCmdRes) Size() (n int)
func (*ClientCmdRes) String ¶
func (m *ClientCmdRes) String() string
func (*ClientCmdRes) Unmarshal ¶
func (m *ClientCmdRes) Unmarshal(dAtA []byte) error
func (*ClientCmdRes) XXX_DiscardUnknown ¶
func (m *ClientCmdRes) XXX_DiscardUnknown()
func (*ClientCmdRes) XXX_Marshal ¶
func (m *ClientCmdRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ClientCmdRes) XXX_Merge ¶
func (m *ClientCmdRes) XXX_Merge(src proto.Message)
func (*ClientCmdRes) XXX_OneofFuncs ¶
func (*ClientCmdRes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
func (*ClientCmdRes) XXX_Size ¶
func (m *ClientCmdRes) XXX_Size() int
func (*ClientCmdRes) XXX_Unmarshal ¶
func (m *ClientCmdRes) XXX_Unmarshal(b []byte) error
type ClientCmdRes_DelRes ¶
type ClientCmdRes_DelRes struct {
DelRes *DelRes `protobuf:"bytes,4,opt,name=delRes,proto3,oneof"`
}
func (*ClientCmdRes_DelRes) MarshalTo ¶
func (m *ClientCmdRes_DelRes) MarshalTo(dAtA []byte) (int, error)
func (*ClientCmdRes_DelRes) Size ¶
func (m *ClientCmdRes_DelRes) Size() (n int)
type ClientCmdRes_PutRes ¶
type ClientCmdRes_PutRes struct {
PutRes *PutRes `protobuf:"bytes,3,opt,name=putRes,proto3,oneof"`
}
func (*ClientCmdRes_PutRes) MarshalTo ¶
func (m *ClientCmdRes_PutRes) MarshalTo(dAtA []byte) (int, error)
func (*ClientCmdRes_PutRes) Size ¶
func (m *ClientCmdRes_PutRes) Size() (n int)
type ClientQueryReq ¶
type ClientQueryReq struct { // Types that are valid to be assigned to Query: // *ClientQueryReq_GetReq Query isClientQueryReq_Query `protobuf_oneof:"query"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ClientQueryReq) Descriptor ¶
func (*ClientQueryReq) Descriptor() ([]byte, []int)
func (*ClientQueryReq) GetGetReq ¶
func (m *ClientQueryReq) GetGetReq() *GetReq
func (*ClientQueryReq) GetQuery ¶
func (m *ClientQueryReq) GetQuery() isClientQueryReq_Query
func (*ClientQueryReq) Marshal ¶
func (m *ClientQueryReq) Marshal() (dAtA []byte, err error)
func (*ClientQueryReq) ProtoMessage ¶
func (*ClientQueryReq) ProtoMessage()
func (*ClientQueryReq) Reset ¶
func (m *ClientQueryReq) Reset()
func (*ClientQueryReq) Size ¶
func (m *ClientQueryReq) Size() (n int)
func (*ClientQueryReq) String ¶
func (m *ClientQueryReq) String() string
func (*ClientQueryReq) Unmarshal ¶
func (m *ClientQueryReq) Unmarshal(dAtA []byte) error
func (*ClientQueryReq) XXX_DiscardUnknown ¶
func (m *ClientQueryReq) XXX_DiscardUnknown()
func (*ClientQueryReq) XXX_Marshal ¶
func (m *ClientQueryReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ClientQueryReq) XXX_Merge ¶
func (m *ClientQueryReq) XXX_Merge(src proto.Message)
func (*ClientQueryReq) XXX_OneofFuncs ¶
func (*ClientQueryReq) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
func (*ClientQueryReq) XXX_Size ¶
func (m *ClientQueryReq) XXX_Size() int
func (*ClientQueryReq) XXX_Unmarshal ¶
func (m *ClientQueryReq) XXX_Unmarshal(b []byte) error
type ClientQueryReq_GetReq ¶
type ClientQueryReq_GetReq struct {
GetReq *GetReq `protobuf:"bytes,1,opt,name=getReq,proto3,oneof"`
}
func (*ClientQueryReq_GetReq) MarshalTo ¶
func (m *ClientQueryReq_GetReq) MarshalTo(dAtA []byte) (int, error)
func (*ClientQueryReq_GetReq) Size ¶
func (m *ClientQueryReq_GetReq) Size() (n int)
type ClientQueryRes ¶
type ClientQueryRes struct { Status ClientRpcStatus `protobuf:"varint,1,opt,name=status,proto3,enum=kv_client.ClientRpcStatus" json:"status,omitempty"` LeaderHint *Address `protobuf:"bytes,2,opt,name=leaderHint,proto3" json:"leaderHint,omitempty"` // Types that are valid to be assigned to Result: // *ClientQueryRes_Value Result isClientQueryRes_Result `protobuf_oneof:"result"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ClientQueryRes) Descriptor ¶
func (*ClientQueryRes) Descriptor() ([]byte, []int)
func (*ClientQueryRes) GetLeaderHint ¶
func (m *ClientQueryRes) GetLeaderHint() *Address
func (*ClientQueryRes) GetResult ¶
func (m *ClientQueryRes) GetResult() isClientQueryRes_Result
func (*ClientQueryRes) GetStatus ¶
func (m *ClientQueryRes) GetStatus() ClientRpcStatus
func (*ClientQueryRes) GetValue ¶
func (m *ClientQueryRes) GetValue() *Value
func (*ClientQueryRes) Marshal ¶
func (m *ClientQueryRes) Marshal() (dAtA []byte, err error)
func (*ClientQueryRes) ProtoMessage ¶
func (*ClientQueryRes) ProtoMessage()
func (*ClientQueryRes) Reset ¶
func (m *ClientQueryRes) Reset()
func (*ClientQueryRes) Size ¶
func (m *ClientQueryRes) Size() (n int)
func (*ClientQueryRes) String ¶
func (m *ClientQueryRes) String() string
func (*ClientQueryRes) Unmarshal ¶
func (m *ClientQueryRes) Unmarshal(dAtA []byte) error
func (*ClientQueryRes) XXX_DiscardUnknown ¶
func (m *ClientQueryRes) XXX_DiscardUnknown()
func (*ClientQueryRes) XXX_Marshal ¶
func (m *ClientQueryRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ClientQueryRes) XXX_Merge ¶
func (m *ClientQueryRes) XXX_Merge(src proto.Message)
func (*ClientQueryRes) XXX_OneofFuncs ¶
func (*ClientQueryRes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
func (*ClientQueryRes) XXX_Size ¶
func (m *ClientQueryRes) XXX_Size() int
func (*ClientQueryRes) XXX_Unmarshal ¶
func (m *ClientQueryRes) XXX_Unmarshal(b []byte) error
type ClientQueryRes_Value ¶
type ClientQueryRes_Value struct {
Value *Value `protobuf:"bytes,3,opt,name=value,proto3,oneof"`
}
func (*ClientQueryRes_Value) MarshalTo ¶
func (m *ClientQueryRes_Value) MarshalTo(dAtA []byte) (int, error)
func (*ClientQueryRes_Value) Size ¶
func (m *ClientQueryRes_Value) Size() (n int)
type ClientRpcStatus ¶
type ClientRpcStatus int32
const ( ClientRpcStatus_OK ClientRpcStatus = 0 ClientRpcStatus_NOT_LEADER ClientRpcStatus = 1 )
func (ClientRpcStatus) EnumDescriptor ¶
func (ClientRpcStatus) EnumDescriptor() ([]byte, []int)
func (ClientRpcStatus) String ¶
func (x ClientRpcStatus) String() string
type ClientServer ¶
type ClientServer interface { RegisterClient(context.Context, *RegisterClientReq) (*RegisterClientRes, error) ExecuteCmd(context.Context, *ClientCmdReq) (*ClientCmdRes, error) Query(context.Context, *ClientQueryReq) (*ClientQueryRes, error) }
ClientServer is the server API for Client service.
type DelReq ¶
type DelReq struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DelReq) Descriptor ¶
func (*DelReq) ProtoMessage ¶
func (*DelReq) ProtoMessage()
func (*DelReq) XXX_DiscardUnknown ¶
func (m *DelReq) XXX_DiscardUnknown()
func (*DelReq) XXX_Marshal ¶
func (*DelReq) XXX_Unmarshal ¶
type DelRes ¶
type DelRes struct { Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DelRes) Descriptor ¶
func (*DelRes) ProtoMessage ¶
func (*DelRes) ProtoMessage()
func (*DelRes) XXX_DiscardUnknown ¶
func (m *DelRes) XXX_DiscardUnknown()
func (*DelRes) XXX_Marshal ¶
func (*DelRes) XXX_Unmarshal ¶
type GetReq ¶
type GetReq struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetReq) Descriptor ¶
func (*GetReq) ProtoMessage ¶
func (*GetReq) ProtoMessage()
func (*GetReq) XXX_DiscardUnknown ¶
func (m *GetReq) XXX_DiscardUnknown()
func (*GetReq) XXX_Marshal ¶
func (*GetReq) XXX_Unmarshal ¶
type HealthCheckRequest ¶
type HealthCheckRequest struct { Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HealthCheckRequest) Descriptor ¶
func (*HealthCheckRequest) Descriptor() ([]byte, []int)
func (*HealthCheckRequest) GetService ¶
func (m *HealthCheckRequest) GetService() string
func (*HealthCheckRequest) Marshal ¶
func (m *HealthCheckRequest) Marshal() (dAtA []byte, err error)
func (*HealthCheckRequest) MarshalTo ¶
func (m *HealthCheckRequest) MarshalTo(dAtA []byte) (int, error)
func (*HealthCheckRequest) ProtoMessage ¶
func (*HealthCheckRequest) ProtoMessage()
func (*HealthCheckRequest) Reset ¶
func (m *HealthCheckRequest) Reset()
func (*HealthCheckRequest) Size ¶
func (m *HealthCheckRequest) Size() (n int)
func (*HealthCheckRequest) String ¶
func (m *HealthCheckRequest) String() string
func (*HealthCheckRequest) Unmarshal ¶
func (m *HealthCheckRequest) Unmarshal(dAtA []byte) error
func (*HealthCheckRequest) XXX_DiscardUnknown ¶
func (m *HealthCheckRequest) XXX_DiscardUnknown()
func (*HealthCheckRequest) XXX_Marshal ¶
func (m *HealthCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HealthCheckRequest) XXX_Merge ¶
func (m *HealthCheckRequest) XXX_Merge(src proto.Message)
func (*HealthCheckRequest) XXX_Size ¶
func (m *HealthCheckRequest) XXX_Size() int
func (*HealthCheckRequest) XXX_Unmarshal ¶
func (m *HealthCheckRequest) XXX_Unmarshal(b []byte) error
type HealthCheckResponse ¶
type HealthCheckResponse struct { Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=kv_client.HealthCheckResponse_ServingStatus" json:"status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HealthCheckResponse) Descriptor ¶
func (*HealthCheckResponse) Descriptor() ([]byte, []int)
func (*HealthCheckResponse) GetStatus ¶
func (m *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus
func (*HealthCheckResponse) Marshal ¶
func (m *HealthCheckResponse) Marshal() (dAtA []byte, err error)
func (*HealthCheckResponse) MarshalTo ¶
func (m *HealthCheckResponse) MarshalTo(dAtA []byte) (int, error)
func (*HealthCheckResponse) ProtoMessage ¶
func (*HealthCheckResponse) ProtoMessage()
func (*HealthCheckResponse) Reset ¶
func (m *HealthCheckResponse) Reset()
func (*HealthCheckResponse) Size ¶
func (m *HealthCheckResponse) Size() (n int)
func (*HealthCheckResponse) String ¶
func (m *HealthCheckResponse) String() string
func (*HealthCheckResponse) Unmarshal ¶
func (m *HealthCheckResponse) Unmarshal(dAtA []byte) error
func (*HealthCheckResponse) XXX_DiscardUnknown ¶
func (m *HealthCheckResponse) XXX_DiscardUnknown()
func (*HealthCheckResponse) XXX_Marshal ¶
func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HealthCheckResponse) XXX_Merge ¶
func (m *HealthCheckResponse) XXX_Merge(src proto.Message)
func (*HealthCheckResponse) XXX_Size ¶
func (m *HealthCheckResponse) XXX_Size() int
func (*HealthCheckResponse) XXX_Unmarshal ¶
func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error
type HealthCheckResponse_ServingStatus ¶
type HealthCheckResponse_ServingStatus int32
const ( HealthCheckResponse_UNKNOWN HealthCheckResponse_ServingStatus = 0 HealthCheckResponse_SERVING HealthCheckResponse_ServingStatus = 1 HealthCheckResponse_NOT_SERVING HealthCheckResponse_ServingStatus = 2 )
func (HealthCheckResponse_ServingStatus) EnumDescriptor ¶
func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int)
func (HealthCheckResponse_ServingStatus) String ¶
func (x HealthCheckResponse_ServingStatus) String() string
type HealthClient ¶
type HealthClient interface {
Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error)
}
HealthClient is the client API for Health service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewHealthClient ¶
func NewHealthClient(cc *grpc.ClientConn) HealthClient
type HealthServer ¶
type HealthServer interface {
Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
}
HealthServer is the server API for Health service.
type KVStoreClient ¶
type KVStoreClient interface { Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Value, error) Put(ctx context.Context, in *PutReq, opts ...grpc.CallOption) (*PutRes, error) Delete(ctx context.Context, in *DelReq, opts ...grpc.CallOption) (*DelRes, error) }
KVStoreClient is the client API for KVStore service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewKVStoreClient ¶
func NewKVStoreClient(cc *grpc.ClientConn) KVStoreClient
type KVStoreServer ¶
type KVStoreServer interface { Get(context.Context, *GetReq) (*Value, error) Put(context.Context, *PutReq) (*PutRes, error) Delete(context.Context, *DelReq) (*DelRes, error) }
KVStoreServer is the server API for KVStore service.
type PutReq ¶
type PutReq struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PutReq) Descriptor ¶
func (*PutReq) ProtoMessage ¶
func (*PutReq) ProtoMessage()
func (*PutReq) XXX_DiscardUnknown ¶
func (m *PutReq) XXX_DiscardUnknown()
func (*PutReq) XXX_Marshal ¶
func (*PutReq) XXX_Unmarshal ¶
type PutRes ¶
type PutRes struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PutRes) Descriptor ¶
func (*PutRes) GetSuccess ¶
func (*PutRes) ProtoMessage ¶
func (*PutRes) ProtoMessage()
func (*PutRes) XXX_DiscardUnknown ¶
func (m *PutRes) XXX_DiscardUnknown()
func (*PutRes) XXX_Marshal ¶
func (*PutRes) XXX_Unmarshal ¶
type RegisterClientReq ¶
type RegisterClientReq struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RegisterClientReq) Descriptor ¶
func (*RegisterClientReq) Descriptor() ([]byte, []int)
func (*RegisterClientReq) Marshal ¶
func (m *RegisterClientReq) Marshal() (dAtA []byte, err error)
func (*RegisterClientReq) MarshalTo ¶
func (m *RegisterClientReq) MarshalTo(dAtA []byte) (int, error)
func (*RegisterClientReq) ProtoMessage ¶
func (*RegisterClientReq) ProtoMessage()
func (*RegisterClientReq) Reset ¶
func (m *RegisterClientReq) Reset()
func (*RegisterClientReq) Size ¶
func (m *RegisterClientReq) Size() (n int)
func (*RegisterClientReq) String ¶
func (m *RegisterClientReq) String() string
func (*RegisterClientReq) Unmarshal ¶
func (m *RegisterClientReq) Unmarshal(dAtA []byte) error
func (*RegisterClientReq) XXX_DiscardUnknown ¶
func (m *RegisterClientReq) XXX_DiscardUnknown()
func (*RegisterClientReq) XXX_Marshal ¶
func (m *RegisterClientReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RegisterClientReq) XXX_Merge ¶
func (m *RegisterClientReq) XXX_Merge(src proto.Message)
func (*RegisterClientReq) XXX_Size ¶
func (m *RegisterClientReq) XXX_Size() int
func (*RegisterClientReq) XXX_Unmarshal ¶
func (m *RegisterClientReq) XXX_Unmarshal(b []byte) error
type RegisterClientRes ¶
type RegisterClientRes struct { Status ClientRpcStatus `protobuf:"varint,1,opt,name=status,proto3,enum=kv_client.ClientRpcStatus" json:"status,omitempty"` ClientId uint64 `protobuf:"varint,2,opt,name=clientId,proto3" json:"clientId,omitempty"` LeaderHint *Address `protobuf:"bytes,3,opt,name=leaderHint,proto3" json:"leaderHint,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RegisterClientRes) Descriptor ¶
func (*RegisterClientRes) Descriptor() ([]byte, []int)
func (*RegisterClientRes) GetClientId ¶
func (m *RegisterClientRes) GetClientId() uint64
func (*RegisterClientRes) GetLeaderHint ¶
func (m *RegisterClientRes) GetLeaderHint() *Address
func (*RegisterClientRes) GetStatus ¶
func (m *RegisterClientRes) GetStatus() ClientRpcStatus
func (*RegisterClientRes) Marshal ¶
func (m *RegisterClientRes) Marshal() (dAtA []byte, err error)
func (*RegisterClientRes) MarshalTo ¶
func (m *RegisterClientRes) MarshalTo(dAtA []byte) (int, error)
func (*RegisterClientRes) ProtoMessage ¶
func (*RegisterClientRes) ProtoMessage()
func (*RegisterClientRes) Reset ¶
func (m *RegisterClientRes) Reset()
func (*RegisterClientRes) Size ¶
func (m *RegisterClientRes) Size() (n int)
func (*RegisterClientRes) String ¶
func (m *RegisterClientRes) String() string
func (*RegisterClientRes) Unmarshal ¶
func (m *RegisterClientRes) Unmarshal(dAtA []byte) error
func (*RegisterClientRes) XXX_DiscardUnknown ¶
func (m *RegisterClientRes) XXX_DiscardUnknown()
func (*RegisterClientRes) XXX_Marshal ¶
func (m *RegisterClientRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RegisterClientRes) XXX_Merge ¶
func (m *RegisterClientRes) XXX_Merge(src proto.Message)
func (*RegisterClientRes) XXX_Size ¶
func (m *RegisterClientRes) XXX_Size() int
func (*RegisterClientRes) XXX_Unmarshal ¶
func (m *RegisterClientRes) XXX_Unmarshal(b []byte) error
type Value ¶
type Value struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Value) Descriptor ¶
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
func (*Value) XXX_DiscardUnknown ¶
func (m *Value) XXX_DiscardUnknown()