Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_tools_testserver_math_math_proto protoreflect.FileDescriptor
var MathService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Math.MathService", HandlerType: (*MathServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Add", Handler: _MathService_Add_Handler, }, { MethodName: "Substract", Handler: _MathService_Substract_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "tools/testserver/math/math.proto", }
MathService_ServiceDesc is the grpc.ServiceDesc for MathService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMathServiceServer ¶
func RegisterMathServiceServer(s grpc.ServiceRegistrar, srv MathServiceServer)
Types ¶
type Input ¶
type Input struct { A int64 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"` B int64 `protobuf:"varint,2,opt,name=b,proto3" json:"b,omitempty"` // contains filtered or unexported fields }
func (*Input) Descriptor
deprecated
func (*Input) ProtoMessage ¶
func (*Input) ProtoMessage()
func (*Input) ProtoReflect ¶
func (x *Input) ProtoReflect() protoreflect.Message
type MathServiceClient ¶
type MathServiceClient interface { Add(ctx context.Context, in *Input, opts ...grpc.CallOption) (*Output, error) Substract(ctx context.Context, in *Input, opts ...grpc.CallOption) (*Output, error) }
MathServiceClient is the client API for MathService 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 NewMathServiceClient ¶
func NewMathServiceClient(cc grpc.ClientConnInterface) MathServiceClient
type MathServiceServer ¶
type MathServiceServer interface { Add(context.Context, *Input) (*Output, error) Substract(context.Context, *Input) (*Output, error) // contains filtered or unexported methods }
MathServiceServer is the server API for MathService service. All implementations must embed UnimplementedMathServiceServer for forward compatibility
type Output ¶
type Output struct { C int64 `protobuf:"varint,1,opt,name=c,proto3" json:"c,omitempty"` // contains filtered or unexported fields }
func (*Output) Descriptor
deprecated
func (*Output) ProtoMessage ¶
func (*Output) ProtoMessage()
func (*Output) ProtoReflect ¶
func (x *Output) ProtoReflect() protoreflect.Message
type UnimplementedMathServiceServer ¶
type UnimplementedMathServiceServer struct { }
UnimplementedMathServiceServer must be embedded to have forward compatible implementations.
type UnsafeMathServiceServer ¶
type UnsafeMathServiceServer interface {
// contains filtered or unexported methods
}
UnsafeMathServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MathServiceServer will result in compilation errors.