Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_primepb_prime_proto protoreflect.FileDescriptor
Functions ¶
func RegisterPrimeServiceServer ¶
func RegisterPrimeServiceServer(s *grpc.Server, srv PrimeServiceServer)
Types ¶
type PrimeRequest ¶
type PrimeRequest struct { // Number to be decomposed Number int64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` // contains filtered or unexported fields }
PrimeRequest describes data sent to the gRPC server to decompose into prime numbers.
func (*PrimeRequest) Descriptor
deprecated
func (*PrimeRequest) Descriptor() ([]byte, []int)
Deprecated: Use PrimeRequest.ProtoReflect.Descriptor instead.
func (*PrimeRequest) GetNumber ¶
func (x *PrimeRequest) GetNumber() int64
func (*PrimeRequest) ProtoMessage ¶
func (*PrimeRequest) ProtoMessage()
func (*PrimeRequest) ProtoReflect ¶
func (x *PrimeRequest) ProtoReflect() protoreflect.Message
func (*PrimeRequest) Reset ¶
func (x *PrimeRequest) Reset()
func (*PrimeRequest) String ¶
func (x *PrimeRequest) String() string
type PrimeResponse ¶
type PrimeResponse struct { // One of the prime numbers Prime int64 `protobuf:"varint,1,opt,name=prime,proto3" json:"prime,omitempty"` // contains filtered or unexported fields }
PrimeResponse describes one response sent to client from many that contain one prime number for the requested number.
func (*PrimeResponse) Descriptor
deprecated
func (*PrimeResponse) Descriptor() ([]byte, []int)
Deprecated: Use PrimeResponse.ProtoReflect.Descriptor instead.
func (*PrimeResponse) GetPrime ¶
func (x *PrimeResponse) GetPrime() int64
func (*PrimeResponse) ProtoMessage ¶
func (*PrimeResponse) ProtoMessage()
func (*PrimeResponse) ProtoReflect ¶
func (x *PrimeResponse) ProtoReflect() protoreflect.Message
func (*PrimeResponse) Reset ¶
func (x *PrimeResponse) Reset()
func (*PrimeResponse) String ¶
func (x *PrimeResponse) String() string
type PrimeServiceClient ¶
type PrimeServiceClient interface { // The Prime API method decompose a number from the PrimeRequest into // many prime numbers using an API stream of PrimeResponse. // It method will throw an INVALID_ARGUMENT exception if the number to // decompose is negative or lower than 2. Prime(ctx context.Context, in *PrimeRequest, opts ...grpc.CallOption) (PrimeService_PrimeClient, error) }
PrimeServiceClient is the client API for PrimeService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPrimeServiceClient ¶
func NewPrimeServiceClient(cc grpc.ClientConnInterface) PrimeServiceClient
type PrimeServiceServer ¶
type PrimeServiceServer interface { // The Prime API method decompose a number from the PrimeRequest into // many prime numbers using an API stream of PrimeResponse. // It method will throw an INVALID_ARGUMENT exception if the number to // decompose is negative or lower than 2. Prime(*PrimeRequest, PrimeService_PrimeServer) error }
PrimeServiceServer is the server API for PrimeService service.
type PrimeService_PrimeClient ¶
type PrimeService_PrimeClient interface { Recv() (*PrimeResponse, error) grpc.ClientStream }
type PrimeService_PrimeServer ¶
type PrimeService_PrimeServer interface { Send(*PrimeResponse) error grpc.ServerStream }
type UnimplementedPrimeServiceServer ¶
type UnimplementedPrimeServiceServer struct { }
UnimplementedPrimeServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedPrimeServiceServer) Prime ¶
func (*UnimplementedPrimeServiceServer) Prime(*PrimeRequest, PrimeService_PrimeServer) error