Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_Proto_Service_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "service.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _Service_Get_Handler, }, { MethodName: "Put", Handler: _Service_Put_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "Proto/Service.proto", }
Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
Types ¶
type GetReply ¶
type GetReply struct { Val int32 `protobuf:"varint,1,opt,name=Val,proto3" json:"Val,omitempty"` // contains filtered or unexported fields }
func (*GetReply) Descriptor
deprecated
func (*GetReply) ProtoMessage ¶
func (*GetReply) ProtoMessage()
func (*GetReply) ProtoReflect ¶
func (x *GetReply) ProtoReflect() protoreflect.Message
type GetRequest ¶
type GetRequest struct { Key int32 `protobuf:"varint,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() int32
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 PutReply ¶
type PutReply struct { Succes bool `protobuf:"varint,1,opt,name=Succes,proto3" json:"Succes,omitempty"` // contains filtered or unexported fields }
func (*PutReply) Descriptor
deprecated
func (*PutReply) ProtoMessage ¶
func (*PutReply) ProtoMessage()
func (*PutReply) ProtoReflect ¶
func (x *PutReply) ProtoReflect() protoreflect.Message
type PutRequest ¶
type PutRequest struct { Key int32 `protobuf:"varint,1,opt,name=Key,proto3" json:"Key,omitempty"` Val int32 `protobuf:"varint,2,opt,name=Val,proto3" json:"Val,omitempty"` // contains filtered or unexported fields }
func (*PutRequest) Descriptor
deprecated
func (*PutRequest) Descriptor() ([]byte, []int)
Deprecated: Use PutRequest.ProtoReflect.Descriptor instead.
func (*PutRequest) GetKey ¶
func (x *PutRequest) GetKey() int32
func (*PutRequest) GetVal ¶
func (x *PutRequest) GetVal() int32
func (*PutRequest) ProtoMessage ¶
func (*PutRequest) ProtoMessage()
func (*PutRequest) ProtoReflect ¶
func (x *PutRequest) ProtoReflect() protoreflect.Message
func (*PutRequest) Reset ¶
func (x *PutRequest) Reset()
func (*PutRequest) String ¶
func (x *PutRequest) String() string
type ServiceClient ¶
type ServiceClient interface { Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetReply, error) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutReply, error) }
ServiceClient is the client API for Service 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 NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶
type ServiceServer interface { Get(context.Context, *GetRequest) (*GetReply, error) Put(context.Context, *PutRequest) (*PutReply, error) // contains filtered or unexported methods }
ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedServiceServer) Get ¶
func (UnimplementedServiceServer) Get(context.Context, *GetRequest) (*GetReply, error)
func (UnimplementedServiceServer) Put ¶
func (UnimplementedServiceServer) Put(context.Context, *PutRequest) (*PutReply, error)
type UnsafeServiceServer ¶
type UnsafeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.