Documentation ¶
Overview ¶
Package go_micro_os_kv is a generated protocol buffer package.
It is generated from these files:
github.com/micro/go-os/kv/proto/kv.proto
It has these top-level messages:
Item GetRequest GetResponse PutRequest PutResponse DelRequest DelResponse
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterKVHandler ¶
func RegisterKVHandler(s server.Server, hdlr KVHandler, opts ...server.HandlerOption)
Types ¶
type DelRequest ¶
type DelRequest struct {
Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
}
func (*DelRequest) Descriptor ¶
func (*DelRequest) Descriptor() ([]byte, []int)
func (*DelRequest) ProtoMessage ¶
func (*DelRequest) ProtoMessage()
func (*DelRequest) Reset ¶
func (m *DelRequest) Reset()
func (*DelRequest) String ¶
func (m *DelRequest) String() string
type DelResponse ¶
type DelResponse struct { }
func (*DelResponse) Descriptor ¶
func (*DelResponse) Descriptor() ([]byte, []int)
func (*DelResponse) ProtoMessage ¶
func (*DelResponse) ProtoMessage()
func (*DelResponse) Reset ¶
func (m *DelResponse) Reset()
func (*DelResponse) String ¶
func (m *DelResponse) String() string
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) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) Reset ¶
func (m *GetRequest) Reset()
func (*GetRequest) String ¶
func (m *GetRequest) String() string
type GetResponse ¶
type GetResponse struct {
Item *Item `protobuf:"bytes,1,opt,name=item" json:"item,omitempty"`
}
func (*GetResponse) Descriptor ¶
func (*GetResponse) Descriptor() ([]byte, []int)
func (*GetResponse) GetItem ¶
func (m *GetResponse) GetItem() *Item
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) Reset ¶
func (m *GetResponse) Reset()
func (*GetResponse) String ¶
func (m *GetResponse) String() string
type Item ¶
type Item struct { Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` Expiration int64 `protobuf:"varint,3,opt,name=expiration" json:"expiration,omitempty"` }
func (*Item) Descriptor ¶
func (*Item) ProtoMessage ¶
func (*Item) ProtoMessage()
type KV ¶
type KV struct {
KVHandler
}
func (*KV) Del ¶
func (h *KV) Del(ctx context.Context, in *DelRequest, out *DelResponse) error
func (*KV) Get ¶
func (h *KV) Get(ctx context.Context, in *GetRequest, out *GetResponse) error
func (*KV) Put ¶
func (h *KV) Put(ctx context.Context, in *PutRequest, out *PutResponse) error
type KVClient ¶
type KVClient interface { Get(ctx context.Context, in *GetRequest, opts ...client.CallOption) (*GetResponse, error) Put(ctx context.Context, in *PutRequest, opts ...client.CallOption) (*PutResponse, error) Del(ctx context.Context, in *DelRequest, opts ...client.CallOption) (*DelResponse, error) }
type KVHandler ¶
type KVHandler interface { Get(context.Context, *GetRequest, *GetResponse) error Put(context.Context, *PutRequest, *PutResponse) error Del(context.Context, *DelRequest, *DelResponse) error }
type PutRequest ¶
type PutRequest struct {
Item *Item `protobuf:"bytes,1,opt,name=item" json:"item,omitempty"`
}
func (*PutRequest) Descriptor ¶
func (*PutRequest) Descriptor() ([]byte, []int)
func (*PutRequest) GetItem ¶
func (m *PutRequest) GetItem() *Item
func (*PutRequest) ProtoMessage ¶
func (*PutRequest) ProtoMessage()
func (*PutRequest) Reset ¶
func (m *PutRequest) Reset()
func (*PutRequest) String ¶
func (m *PutRequest) String() string
type PutResponse ¶
type PutResponse struct { }
func (*PutResponse) Descriptor ¶
func (*PutResponse) Descriptor() ([]byte, []int)
func (*PutResponse) ProtoMessage ¶
func (*PutResponse) ProtoMessage()
func (*PutResponse) Reset ¶
func (m *PutResponse) Reset()
func (*PutResponse) String ¶
func (m *PutResponse) String() string
Click to show internal directories.
Click to hide internal directories.