math

package
v0.4.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_tools_testserver_math_math_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Input.ProtoReflect.Descriptor instead.

func (*Input) GetA

func (x *Input) GetA() int64

func (*Input) GetB

func (x *Input) GetB() int64

func (*Input) ProtoMessage

func (*Input) ProtoMessage()

func (*Input) ProtoReflect

func (x *Input) ProtoReflect() protoreflect.Message

func (*Input) Reset

func (x *Input) Reset()

func (*Input) String

func (x *Input) String() string

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.

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) Descriptor() ([]byte, []int)

Deprecated: Use Output.ProtoReflect.Descriptor instead.

func (*Output) GetC

func (x *Output) GetC() int64

func (*Output) ProtoMessage

func (*Output) ProtoMessage()

func (*Output) ProtoReflect

func (x *Output) ProtoReflect() protoreflect.Message

func (*Output) Reset

func (x *Output) Reset()

func (*Output) String

func (x *Output) String() string

type UnimplementedMathServiceServer

type UnimplementedMathServiceServer struct {
}

UnimplementedMathServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedMathServiceServer) Add

func (UnimplementedMathServiceServer) Substract

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL