Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_sum_proto protoreflect.FileDescriptor
var SumService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sum.SumService", HandlerType: (*SumServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Sum2Numbers", Handler: _SumService_Sum2Numbers_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sum.proto", }
SumService_ServiceDesc is the grpc.ServiceDesc for SumService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSumServiceServer ¶
func RegisterSumServiceServer(s grpc.ServiceRegistrar, srv SumServiceServer)
Types ¶
type Request ¶
type Request struct { Number1 float32 `protobuf:"fixed32,1,opt,name=number1,proto3" json:"number1,omitempty"` Number2 float32 `protobuf:"fixed32,2,opt,name=number2,proto3" json:"number2,omitempty"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) GetNumber1 ¶
func (*Request) GetNumber2 ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { Sum float32 `protobuf:"fixed32,1,opt,name=sum,proto3" json:"sum,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type SumServiceClient ¶
type SumServiceClient interface {
Sum2Numbers(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
SumServiceClient is the client API for SumService 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 NewSumServiceClient ¶
func NewSumServiceClient(cc grpc.ClientConnInterface) SumServiceClient
type SumServiceServer ¶
SumServiceServer is the server API for SumService service. All implementations should embed UnimplementedSumServiceServer for forward compatibility
type UnimplementedSumServiceServer ¶
type UnimplementedSumServiceServer struct { }
UnimplementedSumServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedSumServiceServer) Sum2Numbers ¶
type UnsafeSumServiceServer ¶
type UnsafeSumServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSumServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SumServiceServer will result in compilation errors.