Documentation ¶
Overview ¶
Package kv is a generated protocol buffer package.
It is generated from these files:
kv.proto
It has these top-level messages:
GetRequest GetResponse SetRequest SetResponse
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterKVServer ¶
Types ¶
type GetRequest ¶
type GetRequest struct {
Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
}
func (*GetRequest) Descriptor ¶
func (*GetRequest) Descriptor() ([]byte, []int)
func (*GetRequest) GetKey ¶ added in v1.2.0
func (m *GetRequest) GetKey() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) Reset ¶
func (m *GetRequest) Reset()
func (*GetRequest) String ¶
func (m *GetRequest) String() string
type GetResponse ¶
type GetResponse struct {
Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
}
func (*GetResponse) Descriptor ¶
func (*GetResponse) Descriptor() ([]byte, []int)
func (*GetResponse) GetValue ¶ added in v1.2.0
func (m *GetResponse) GetValue() string
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) Reset ¶
func (m *GetResponse) Reset()
func (*GetResponse) String ¶
func (m *GetResponse) String() string
type KVClient ¶
type KVClient interface { Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error) }
func NewKVClient ¶
func NewKVClient(cc *grpc.ClientConn) KVClient
type KVServer ¶
type KVServer interface { Get(context.Context, *GetRequest) (*GetResponse, error) Set(context.Context, *SetRequest) (*SetResponse, error) }
type SetRequest ¶
type SetRequest struct { Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` }
func (*SetRequest) Descriptor ¶
func (*SetRequest) Descriptor() ([]byte, []int)
func (*SetRequest) GetKey ¶ added in v1.2.0
func (m *SetRequest) GetKey() string
func (*SetRequest) GetValue ¶ added in v1.2.0
func (m *SetRequest) GetValue() string
func (*SetRequest) ProtoMessage ¶
func (*SetRequest) ProtoMessage()
func (*SetRequest) Reset ¶
func (m *SetRequest) Reset()
func (*SetRequest) String ¶
func (m *SetRequest) String() string
type SetResponse ¶
type SetResponse struct {
Ok bool `protobuf:"varint,1,opt,name=ok" json:"ok,omitempty"`
}
func (*SetResponse) Descriptor ¶
func (*SetResponse) Descriptor() ([]byte, []int)
func (*SetResponse) GetOk ¶ added in v1.2.0
func (m *SetResponse) GetOk() bool
func (*SetResponse) ProtoMessage ¶
func (*SetResponse) ProtoMessage()
func (*SetResponse) Reset ¶
func (m *SetResponse) Reset()
func (*SetResponse) String ¶
func (m *SetResponse) String() string
Click to show internal directories.
Click to hide internal directories.