Documentation ¶
Overview ¶
Package proto is a generated protocol buffer package.
It is generated from these files:
rpc.proto
It has these top-level messages:
SetOptArg SetOptRet GetOptArg GetOptRet DelOptArg DelOptRet
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RCODE_name = map[int32]string{
0: "SUCCESS",
1: "FAILURE",
}
View Source
var RCODE_value = map[string]int32{
"SUCCESS": 0,
"FAILURE": 1,
}
Functions ¶
func RegisterRpcServiceServer ¶
func RegisterRpcServiceServer(s *grpc.Server, srv RpcServiceServer)
Types ¶
type DelOptArg ¶
type DelOptArg struct {
Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
}
func (*DelOptArg) Descriptor ¶
func (*DelOptArg) ProtoMessage ¶
func (*DelOptArg) ProtoMessage()
type DelOptRet ¶
type DelOptRet struct {
Code RCODE `protobuf:"varint,1,opt,name=code,enum=proto.RCODE" json:"code,omitempty"`
}
func (*DelOptRet) Descriptor ¶
func (*DelOptRet) ProtoMessage ¶
func (*DelOptRet) ProtoMessage()
type GetOptArg ¶
type GetOptArg struct {
Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
}
func (*GetOptArg) Descriptor ¶
func (*GetOptArg) ProtoMessage ¶
func (*GetOptArg) ProtoMessage()
type GetOptRet ¶
type GetOptRet struct { Code RCODE `protobuf:"varint,1,opt,name=code,enum=proto.RCODE" json:"code,omitempty"` Val []byte `protobuf:"bytes,2,opt,name=val,proto3" json:"val,omitempty"` }
func (*GetOptRet) Descriptor ¶
func (*GetOptRet) ProtoMessage ¶
func (*GetOptRet) ProtoMessage()
type RpcServiceClient ¶
type RpcServiceClient interface { Set(ctx context.Context, in *SetOptArg, opts ...grpc.CallOption) (*SetOptRet, error) Get(ctx context.Context, in *GetOptArg, opts ...grpc.CallOption) (*GetOptRet, error) Delete(ctx context.Context, in *DelOptArg, opts ...grpc.CallOption) (*DelOptRet, error) }
func NewRpcServiceClient ¶
func NewRpcServiceClient(cc *grpc.ClientConn) RpcServiceClient
type RpcServiceServer ¶
type SetOptArg ¶
type SetOptArg struct { Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Val []byte `protobuf:"bytes,2,opt,name=val,proto3" json:"val,omitempty"` Ttl uint64 `protobuf:"varint,3,opt,name=ttl" json:"ttl,omitempty"` }
func (*SetOptArg) Descriptor ¶
func (*SetOptArg) ProtoMessage ¶
func (*SetOptArg) ProtoMessage()
type SetOptRet ¶
type SetOptRet struct {
Code RCODE `protobuf:"varint,1,opt,name=code,enum=proto.RCODE" json:"code,omitempty"`
}
func (*SetOptRet) Descriptor ¶
func (*SetOptRet) ProtoMessage ¶
func (*SetOptRet) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.