sum

package module
v0.0.0-...-3d25f2c Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetNumber1

func (x *Request) GetNumber1() float32

func (*Request) GetNumber2

func (x *Request) GetNumber2() float32

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetSum

func (x *Response) GetSum() float32

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type Server

type Server struct {
}

func (*Server) Sum2Numbers

func (s *Server) Sum2Numbers(ctx context.Context, request *Request) (*Response, error)

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

type SumServiceServer interface {
	Sum2Numbers(context.Context, *Request) (*Response, error)
}

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.

Jump to

Keyboard shortcuts

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