Documentation ¶
Overview ¶
Package proto is a generated protocol buffer package.
It is generated from these files:
kv.proto
It has these top-level messages:
GetRequest GetResponse PutRequest Empty SumRequest SumResponse
Index ¶
- func RegisterAddHelperServer(s *grpc.Server, srv AddHelperServer)
- func RegisterCounterServer(s *grpc.Server, srv CounterServer)
- type AddHelperClient
- type AddHelperServer
- type CounterClient
- type CounterServer
- type Empty
- type GetRequest
- type GetResponse
- type PutRequest
- type SumRequest
- type SumResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAddHelperServer ¶
func RegisterAddHelperServer(s *grpc.Server, srv AddHelperServer)
func RegisterCounterServer ¶
func RegisterCounterServer(s *grpc.Server, srv CounterServer)
Types ¶
type AddHelperClient ¶
type AddHelperClient interface {
Sum(ctx context.Context, in *SumRequest, opts ...grpc.CallOption) (*SumResponse, error)
}
func NewAddHelperClient ¶
func NewAddHelperClient(cc *grpc.ClientConn) AddHelperClient
type AddHelperServer ¶
type AddHelperServer interface {
Sum(context.Context, *SumRequest) (*SumResponse, error)
}
type CounterClient ¶
type CounterClient interface { Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*Empty, error) }
func NewCounterClient ¶
func NewCounterClient(cc *grpc.ClientConn) CounterClient
type CounterServer ¶
type CounterServer interface { Get(context.Context, *GetRequest) (*GetResponse, error) Put(context.Context, *PutRequest) (*Empty, error) }
type Empty ¶
type Empty struct { }
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
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 ¶
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 int64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
}
func (*GetResponse) Descriptor ¶
func (*GetResponse) Descriptor() ([]byte, []int)
func (*GetResponse) GetValue ¶
func (m *GetResponse) GetValue() int64
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) Reset ¶
func (m *GetResponse) Reset()
func (*GetResponse) String ¶
func (m *GetResponse) String() string
type PutRequest ¶
type PutRequest struct { AddServer uint32 `protobuf:"varint,1,opt,name=add_server,json=addServer" json:"add_server,omitempty"` Key string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"` Value int64 `protobuf:"varint,3,opt,name=value" json:"value,omitempty"` }
func (*PutRequest) Descriptor ¶
func (*PutRequest) Descriptor() ([]byte, []int)
func (*PutRequest) GetAddServer ¶
func (m *PutRequest) GetAddServer() uint32
func (*PutRequest) GetKey ¶
func (m *PutRequest) GetKey() string
func (*PutRequest) GetValue ¶
func (m *PutRequest) GetValue() int64
func (*PutRequest) ProtoMessage ¶
func (*PutRequest) ProtoMessage()
func (*PutRequest) Reset ¶
func (m *PutRequest) Reset()
func (*PutRequest) String ¶
func (m *PutRequest) String() string
type SumRequest ¶
type SumRequest struct { A int64 `protobuf:"varint,1,opt,name=a" json:"a,omitempty"` B int64 `protobuf:"varint,2,opt,name=b" json:"b,omitempty"` }
func (*SumRequest) Descriptor ¶
func (*SumRequest) Descriptor() ([]byte, []int)
func (*SumRequest) GetA ¶
func (m *SumRequest) GetA() int64
func (*SumRequest) GetB ¶
func (m *SumRequest) GetB() int64
func (*SumRequest) ProtoMessage ¶
func (*SumRequest) ProtoMessage()
func (*SumRequest) Reset ¶
func (m *SumRequest) Reset()
func (*SumRequest) String ¶
func (m *SumRequest) String() string
type SumResponse ¶
type SumResponse struct {
R int64 `protobuf:"varint,1,opt,name=r" json:"r,omitempty"`
}
func (*SumResponse) Descriptor ¶
func (*SumResponse) Descriptor() ([]byte, []int)
func (*SumResponse) GetR ¶
func (m *SumResponse) GetR() int64
func (*SumResponse) ProtoMessage ¶
func (*SumResponse) ProtoMessage()
func (*SumResponse) Reset ¶
func (m *SumResponse) Reset()
func (*SumResponse) String ¶
func (m *SumResponse) String() string
Click to show internal directories.
Click to hide internal directories.