Documentation ¶
Index ¶
- Variables
- func RegisterCalculatorServiceServer(s *grpc.Server, srv CalculatorServiceServer)
- type AverageRequest
- type AverageResponse
- type CalculatorServiceClient
- type CalculatorServiceServer
- type CalculatorService_AverageClient
- type CalculatorService_AverageServer
- type CalculatorService_FindMaxClient
- type CalculatorService_FindMaxServer
- type CalculatorService_PrimeNumberDecompositionClient
- type CalculatorService_PrimeNumberDecompositionServer
- type FindMaxRequest
- type FindMaxResponse
- type PNDRequest
- type PNDResponse
- type SquareRequest
- type SquareResponse
- type SumRequest
- type SumResponse
- type UnimplementedCalculatorServiceServer
- func (*UnimplementedCalculatorServiceServer) Average(CalculatorService_AverageServer) error
- func (*UnimplementedCalculatorServiceServer) FindMax(CalculatorService_FindMaxServer) error
- func (*UnimplementedCalculatorServiceServer) PrimeNumberDecomposition(*PNDRequest, CalculatorService_PrimeNumberDecompositionServer) error
- func (*UnimplementedCalculatorServiceServer) Square(context.Context, *SquareRequest) (*SquareResponse, error)
- func (*UnimplementedCalculatorServiceServer) Sum(context.Context, *SumRequest) (*SumResponse, error)
- func (*UnimplementedCalculatorServiceServer) SumWithDeadline(context.Context, *SumRequest) (*SumResponse, error)
Constants ¶
This section is empty.
Variables ¶
var File_example_ngrpc_calculator_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCalculatorServiceServer ¶
func RegisterCalculatorServiceServer(s *grpc.Server, srv CalculatorServiceServer)
Types ¶
type AverageRequest ¶
type AverageRequest struct { Num float32 `protobuf:"fixed32,1,opt,name=num,proto3" json:"num,omitempty"` // contains filtered or unexported fields }
func (*AverageRequest) Descriptor
deprecated
func (*AverageRequest) Descriptor() ([]byte, []int)
Deprecated: Use AverageRequest.ProtoReflect.Descriptor instead.
func (*AverageRequest) GetNum ¶
func (x *AverageRequest) GetNum() float32
func (*AverageRequest) ProtoMessage ¶
func (*AverageRequest) ProtoMessage()
func (*AverageRequest) ProtoReflect ¶
func (x *AverageRequest) ProtoReflect() protoreflect.Message
func (*AverageRequest) Reset ¶
func (x *AverageRequest) Reset()
func (*AverageRequest) String ¶
func (x *AverageRequest) String() string
type AverageResponse ¶
type AverageResponse struct { Result float32 `protobuf:"fixed32,1,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*AverageResponse) Descriptor
deprecated
func (*AverageResponse) Descriptor() ([]byte, []int)
Deprecated: Use AverageResponse.ProtoReflect.Descriptor instead.
func (*AverageResponse) GetResult ¶
func (x *AverageResponse) GetResult() float32
func (*AverageResponse) ProtoMessage ¶
func (*AverageResponse) ProtoMessage()
func (*AverageResponse) ProtoReflect ¶
func (x *AverageResponse) ProtoReflect() protoreflect.Message
func (*AverageResponse) Reset ¶
func (x *AverageResponse) Reset()
func (*AverageResponse) String ¶
func (x *AverageResponse) String() string
type CalculatorServiceClient ¶
type CalculatorServiceClient interface { Sum(ctx context.Context, in *SumRequest, opts ...grpc.CallOption) (*SumResponse, error) SumWithDeadline(ctx context.Context, in *SumRequest, opts ...grpc.CallOption) (*SumResponse, error) PrimeNumberDecomposition(ctx context.Context, in *PNDRequest, opts ...grpc.CallOption) (CalculatorService_PrimeNumberDecompositionClient, error) Average(ctx context.Context, opts ...grpc.CallOption) (CalculatorService_AverageClient, error) FindMax(ctx context.Context, opts ...grpc.CallOption) (CalculatorService_FindMaxClient, error) Square(ctx context.Context, in *SquareRequest, opts ...grpc.CallOption) (*SquareResponse, error) }
CalculatorServiceClient is the client API for CalculatorService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCalculatorServiceClient ¶
func NewCalculatorServiceClient(cc grpc.ClientConnInterface) CalculatorServiceClient
type CalculatorServiceServer ¶
type CalculatorServiceServer interface { Sum(context.Context, *SumRequest) (*SumResponse, error) SumWithDeadline(context.Context, *SumRequest) (*SumResponse, error) PrimeNumberDecomposition(*PNDRequest, CalculatorService_PrimeNumberDecompositionServer) error Average(CalculatorService_AverageServer) error FindMax(CalculatorService_FindMaxServer) error Square(context.Context, *SquareRequest) (*SquareResponse, error) }
CalculatorServiceServer is the server API for CalculatorService service.
type CalculatorService_AverageClient ¶
type CalculatorService_AverageClient interface { Send(*AverageRequest) error CloseAndRecv() (*AverageResponse, error) grpc.ClientStream }
type CalculatorService_AverageServer ¶
type CalculatorService_AverageServer interface { SendAndClose(*AverageResponse) error Recv() (*AverageRequest, error) grpc.ServerStream }
type CalculatorService_FindMaxClient ¶
type CalculatorService_FindMaxClient interface { Send(*FindMaxRequest) error Recv() (*FindMaxResponse, error) grpc.ClientStream }
type CalculatorService_FindMaxServer ¶
type CalculatorService_FindMaxServer interface { Send(*FindMaxResponse) error Recv() (*FindMaxRequest, error) grpc.ServerStream }
type CalculatorService_PrimeNumberDecompositionClient ¶
type CalculatorService_PrimeNumberDecompositionClient interface { Recv() (*PNDResponse, error) grpc.ClientStream }
type CalculatorService_PrimeNumberDecompositionServer ¶
type CalculatorService_PrimeNumberDecompositionServer interface { Send(*PNDResponse) error grpc.ServerStream }
type FindMaxRequest ¶
type FindMaxRequest struct { Num int32 `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty"` // contains filtered or unexported fields }
func (*FindMaxRequest) Descriptor
deprecated
func (*FindMaxRequest) Descriptor() ([]byte, []int)
Deprecated: Use FindMaxRequest.ProtoReflect.Descriptor instead.
func (*FindMaxRequest) GetNum ¶
func (x *FindMaxRequest) GetNum() int32
func (*FindMaxRequest) ProtoMessage ¶
func (*FindMaxRequest) ProtoMessage()
func (*FindMaxRequest) ProtoReflect ¶
func (x *FindMaxRequest) ProtoReflect() protoreflect.Message
func (*FindMaxRequest) Reset ¶
func (x *FindMaxRequest) Reset()
func (*FindMaxRequest) String ¶
func (x *FindMaxRequest) String() string
type FindMaxResponse ¶
type FindMaxResponse struct { Max int32 `protobuf:"varint,1,opt,name=max,proto3" json:"max,omitempty"` // contains filtered or unexported fields }
func (*FindMaxResponse) Descriptor
deprecated
func (*FindMaxResponse) Descriptor() ([]byte, []int)
Deprecated: Use FindMaxResponse.ProtoReflect.Descriptor instead.
func (*FindMaxResponse) GetMax ¶
func (x *FindMaxResponse) GetMax() int32
func (*FindMaxResponse) ProtoMessage ¶
func (*FindMaxResponse) ProtoMessage()
func (*FindMaxResponse) ProtoReflect ¶
func (x *FindMaxResponse) ProtoReflect() protoreflect.Message
func (*FindMaxResponse) Reset ¶
func (x *FindMaxResponse) Reset()
func (*FindMaxResponse) String ¶
func (x *FindMaxResponse) String() string
type PNDRequest ¶
type PNDRequest struct { Number int32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` // contains filtered or unexported fields }
func (*PNDRequest) Descriptor
deprecated
func (*PNDRequest) Descriptor() ([]byte, []int)
Deprecated: Use PNDRequest.ProtoReflect.Descriptor instead.
func (*PNDRequest) GetNumber ¶
func (x *PNDRequest) GetNumber() int32
func (*PNDRequest) ProtoMessage ¶
func (*PNDRequest) ProtoMessage()
func (*PNDRequest) ProtoReflect ¶
func (x *PNDRequest) ProtoReflect() protoreflect.Message
func (*PNDRequest) Reset ¶
func (x *PNDRequest) Reset()
func (*PNDRequest) String ¶
func (x *PNDRequest) String() string
type PNDResponse ¶
type PNDResponse struct { Result int32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*PNDResponse) Descriptor
deprecated
func (*PNDResponse) Descriptor() ([]byte, []int)
Deprecated: Use PNDResponse.ProtoReflect.Descriptor instead.
func (*PNDResponse) GetResult ¶
func (x *PNDResponse) GetResult() int32
func (*PNDResponse) ProtoMessage ¶
func (*PNDResponse) ProtoMessage()
func (*PNDResponse) ProtoReflect ¶
func (x *PNDResponse) ProtoReflect() protoreflect.Message
func (*PNDResponse) Reset ¶
func (x *PNDResponse) Reset()
func (*PNDResponse) String ¶
func (x *PNDResponse) String() string
type SquareRequest ¶
type SquareRequest struct { Num int32 `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty"` // contains filtered or unexported fields }
func (*SquareRequest) Descriptor
deprecated
func (*SquareRequest) Descriptor() ([]byte, []int)
Deprecated: Use SquareRequest.ProtoReflect.Descriptor instead.
func (*SquareRequest) GetNum ¶
func (x *SquareRequest) GetNum() int32
func (*SquareRequest) ProtoMessage ¶
func (*SquareRequest) ProtoMessage()
func (*SquareRequest) ProtoReflect ¶
func (x *SquareRequest) ProtoReflect() protoreflect.Message
func (*SquareRequest) Reset ¶
func (x *SquareRequest) Reset()
func (*SquareRequest) String ¶
func (x *SquareRequest) String() string
type SquareResponse ¶
type SquareResponse struct { SquareRoot float64 `protobuf:"fixed64,1,opt,name=squareRoot,proto3" json:"squareRoot,omitempty"` // contains filtered or unexported fields }
func (*SquareResponse) Descriptor
deprecated
func (*SquareResponse) Descriptor() ([]byte, []int)
Deprecated: Use SquareResponse.ProtoReflect.Descriptor instead.
func (*SquareResponse) GetSquareRoot ¶
func (x *SquareResponse) GetSquareRoot() float64
func (*SquareResponse) ProtoMessage ¶
func (*SquareResponse) ProtoMessage()
func (*SquareResponse) ProtoReflect ¶
func (x *SquareResponse) ProtoReflect() protoreflect.Message
func (*SquareResponse) Reset ¶
func (x *SquareResponse) Reset()
func (*SquareResponse) String ¶
func (x *SquareResponse) String() string
type SumRequest ¶
type SumRequest struct { Num1 int32 `protobuf:"varint,1,opt,name=num1,proto3" json:"num1,omitempty"` Num2 int32 `protobuf:"varint,2,opt,name=num2,proto3" json:"num2,omitempty"` // contains filtered or unexported fields }
func (*SumRequest) Descriptor
deprecated
func (*SumRequest) Descriptor() ([]byte, []int)
Deprecated: Use SumRequest.ProtoReflect.Descriptor instead.
func (*SumRequest) GetNum1 ¶
func (x *SumRequest) GetNum1() int32
func (*SumRequest) GetNum2 ¶
func (x *SumRequest) GetNum2() int32
func (*SumRequest) ProtoMessage ¶
func (*SumRequest) ProtoMessage()
func (*SumRequest) ProtoReflect ¶
func (x *SumRequest) ProtoReflect() protoreflect.Message
func (*SumRequest) Reset ¶
func (x *SumRequest) Reset()
func (*SumRequest) String ¶
func (x *SumRequest) String() string
type SumResponse ¶
type SumResponse struct { Result int32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*SumResponse) Descriptor
deprecated
func (*SumResponse) Descriptor() ([]byte, []int)
Deprecated: Use SumResponse.ProtoReflect.Descriptor instead.
func (*SumResponse) GetResult ¶
func (x *SumResponse) GetResult() int32
func (*SumResponse) ProtoMessage ¶
func (*SumResponse) ProtoMessage()
func (*SumResponse) ProtoReflect ¶
func (x *SumResponse) ProtoReflect() protoreflect.Message
func (*SumResponse) Reset ¶
func (x *SumResponse) Reset()
func (*SumResponse) String ¶
func (x *SumResponse) String() string
type UnimplementedCalculatorServiceServer ¶
type UnimplementedCalculatorServiceServer struct { }
UnimplementedCalculatorServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedCalculatorServiceServer) Average ¶
func (*UnimplementedCalculatorServiceServer) Average(CalculatorService_AverageServer) error
func (*UnimplementedCalculatorServiceServer) FindMax ¶
func (*UnimplementedCalculatorServiceServer) FindMax(CalculatorService_FindMaxServer) error
func (*UnimplementedCalculatorServiceServer) PrimeNumberDecomposition ¶
func (*UnimplementedCalculatorServiceServer) PrimeNumberDecomposition(*PNDRequest, CalculatorService_PrimeNumberDecompositionServer) error
func (*UnimplementedCalculatorServiceServer) Square ¶
func (*UnimplementedCalculatorServiceServer) Square(context.Context, *SquareRequest) (*SquareResponse, error)
func (*UnimplementedCalculatorServiceServer) Sum ¶
func (*UnimplementedCalculatorServiceServer) Sum(context.Context, *SumRequest) (*SumResponse, error)
func (*UnimplementedCalculatorServiceServer) SumWithDeadline ¶
func (*UnimplementedCalculatorServiceServer) SumWithDeadline(context.Context, *SumRequest) (*SumResponse, error)