Documentation ¶
Index ¶
Constants ¶
const ( Hellokv_Get_FullMethodName = "/hellokv.Hellokv/Get" Hellokv_Set_FullMethodName = "/hellokv.Hellokv/Set" )
Variables ¶
var File_pb_hellokv_proto protoreflect.FileDescriptor
var Hellokv_ServiceDesc = grpc.ServiceDesc{ ServiceName: "hellokv.Hellokv", HandlerType: (*HellokvServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _Hellokv_Get_Handler, }, { MethodName: "Set", Handler: _Hellokv_Set_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pb/hellokv.proto", }
Hellokv_ServiceDesc is the grpc.ServiceDesc for Hellokv service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHellokvServer ¶
func RegisterHellokvServer(s grpc.ServiceRegistrar, srv HellokvServer)
Types ¶
type GetRequest ¶
type GetRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetKey ¶
func (x *GetRequest) GetKey() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type GetResponse ¶
type GetResponse struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetValue ¶
func (x *GetResponse) GetValue() string
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
type HellokvClient ¶
type HellokvClient interface { Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error) }
HellokvClient is the client API for Hellokv service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewHellokvClient ¶
func NewHellokvClient(cc grpc.ClientConnInterface) HellokvClient
type HellokvServer ¶
type HellokvServer interface { Get(context.Context, *GetRequest) (*GetResponse, error) Set(context.Context, *SetRequest) (*SetResponse, error) // contains filtered or unexported methods }
HellokvServer is the server API for Hellokv service. All implementations must embed UnimplementedHellokvServer for forward compatibility
type SetRequest ¶
type SetRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*SetRequest) Descriptor
deprecated
func (*SetRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetRequest.ProtoReflect.Descriptor instead.
func (*SetRequest) GetKey ¶
func (x *SetRequest) GetKey() string
func (*SetRequest) GetValue ¶
func (x *SetRequest) GetValue() string
func (*SetRequest) ProtoMessage ¶
func (*SetRequest) ProtoMessage()
func (*SetRequest) ProtoReflect ¶
func (x *SetRequest) ProtoReflect() protoreflect.Message
func (*SetRequest) Reset ¶
func (x *SetRequest) Reset()
func (*SetRequest) String ¶
func (x *SetRequest) String() string
type SetResponse ¶
type SetResponse struct {
// contains filtered or unexported fields
}
func (*SetResponse) Descriptor
deprecated
func (*SetResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetResponse.ProtoReflect.Descriptor instead.
func (*SetResponse) ProtoMessage ¶
func (*SetResponse) ProtoMessage()
func (*SetResponse) ProtoReflect ¶
func (x *SetResponse) ProtoReflect() protoreflect.Message
func (*SetResponse) Reset ¶
func (x *SetResponse) Reset()
func (*SetResponse) String ¶
func (x *SetResponse) String() string
type UnimplementedHellokvServer ¶
type UnimplementedHellokvServer struct { }
UnimplementedHellokvServer must be embedded to have forward compatible implementations.
func (UnimplementedHellokvServer) Get ¶
func (UnimplementedHellokvServer) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedHellokvServer) Set ¶
func (UnimplementedHellokvServer) Set(context.Context, *SetRequest) (*SetResponse, error)
type UnsafeHellokvServer ¶
type UnsafeHellokvServer interface {
// contains filtered or unexported methods
}
UnsafeHellokvServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HellokvServer will result in compilation errors.