Documentation
¶
Overview ¶
Package api is a generated protocol buffer package.
It is generated from these files:
api.proto
It has these top-level messages:
Request Response
Index ¶
- func RegisterKvServer(s *grpc.Server, srv KvServer)
- type KvClient
- type KvServer
- type Request
- type Response
- type Server
- func (s *Server) Delete(ctx context.Context, in *Request) (*Response, error)
- func (s *Server) Get(ctx context.Context, in *Request) (*Response, error)
- func (s *Server) HasKey(ctx context.Context, in *Request) (*Response, error)
- func (s *Server) Keys(ctx context.Context, in *empty.Empty) (*Response, error)
- func (s *Server) Put(ctx context.Context, in *Request) (*Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterKvServer ¶
Types ¶
type KvClient ¶
type KvClient interface {
Get(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
Put(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
Delete(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
Keys(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*Response, error)
HasKey(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
func NewKvClient ¶
func NewKvClient(cc *grpc.ClientConn) KvClient
type Request ¶
type Request struct {
Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
}
func (*Request) Descriptor ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
type Response ¶
type Response struct {
Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
Err string `protobuf:"bytes,3,opt,name=err" json:"err,omitempty"`
Keys []string `protobuf:"bytes,4,rep,name=keys" json:"keys,omitempty"`
}
func (*Response) Descriptor ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the gRPC server.
Click to show internal directories.
Click to hide internal directories.