Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterGRPCServer(s grpc.ServiceRegistrar, srv GRPCServer)
- type GRPCClient
- type GRPCServer
- type PizzaEvaluationRequest
- func (*PizzaEvaluationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PizzaEvaluationRequest) GetDough() string
- func (x *PizzaEvaluationRequest) GetIngredients() []string
- func (*PizzaEvaluationRequest) ProtoMessage()
- func (x *PizzaEvaluationRequest) ProtoReflect() protoreflect.Message
- func (x *PizzaEvaluationRequest) Reset()
- func (x *PizzaEvaluationRequest) String() string
- type PizzaEvaluationResponse
- func (*PizzaEvaluationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PizzaEvaluationResponse) GetStarsRating() int32
- func (*PizzaEvaluationResponse) ProtoMessage()
- func (x *PizzaEvaluationResponse) ProtoReflect() protoreflect.Message
- func (x *PizzaEvaluationResponse) Reset()
- func (x *PizzaEvaluationResponse) String() string
- type StatusRequest
- type StatusResponse
- type UnimplementedGRPCServer
- type UnsafeGRPCServer
Constants ¶
const ( GRPC_Status_FullMethodName = "/quickpizza.GRPC/Status" GRPC_EvaluatePizza_FullMethodName = "/quickpizza.GRPC/EvaluatePizza" )
Variables ¶
var File_proto_quickpizza_proto protoreflect.FileDescriptor
var GRPC_ServiceDesc = grpc.ServiceDesc{ ServiceName: "quickpizza.GRPC", HandlerType: (*GRPCServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Status", Handler: _GRPC_Status_Handler, }, { MethodName: "EvaluatePizza", Handler: _GRPC_EvaluatePizza_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/quickpizza.proto", }
GRPC_ServiceDesc is the grpc.ServiceDesc for GRPC service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGRPCServer ¶
func RegisterGRPCServer(s grpc.ServiceRegistrar, srv GRPCServer)
Types ¶
type GRPCClient ¶
type GRPCClient interface { Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) EvaluatePizza(ctx context.Context, in *PizzaEvaluationRequest, opts ...grpc.CallOption) (*PizzaEvaluationResponse, error) }
GRPCClient is the client API for GRPC 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 NewGRPCClient ¶
func NewGRPCClient(cc grpc.ClientConnInterface) GRPCClient
type GRPCServer ¶
type GRPCServer interface { Status(context.Context, *StatusRequest) (*StatusResponse, error) EvaluatePizza(context.Context, *PizzaEvaluationRequest) (*PizzaEvaluationResponse, error) // contains filtered or unexported methods }
GRPCServer is the server API for GRPC service. All implementations must embed UnimplementedGRPCServer for forward compatibility.
type PizzaEvaluationRequest ¶
type PizzaEvaluationRequest struct { Ingredients []string `protobuf:"bytes,1,rep,name=ingredients,proto3" json:"ingredients,omitempty"` Dough string `protobuf:"bytes,2,opt,name=dough,proto3" json:"dough,omitempty"` // contains filtered or unexported fields }
func (*PizzaEvaluationRequest) Descriptor
deprecated
func (*PizzaEvaluationRequest) Descriptor() ([]byte, []int)
Deprecated: Use PizzaEvaluationRequest.ProtoReflect.Descriptor instead.
func (*PizzaEvaluationRequest) GetDough ¶
func (x *PizzaEvaluationRequest) GetDough() string
func (*PizzaEvaluationRequest) GetIngredients ¶
func (x *PizzaEvaluationRequest) GetIngredients() []string
func (*PizzaEvaluationRequest) ProtoMessage ¶
func (*PizzaEvaluationRequest) ProtoMessage()
func (*PizzaEvaluationRequest) ProtoReflect ¶
func (x *PizzaEvaluationRequest) ProtoReflect() protoreflect.Message
func (*PizzaEvaluationRequest) Reset ¶
func (x *PizzaEvaluationRequest) Reset()
func (*PizzaEvaluationRequest) String ¶
func (x *PizzaEvaluationRequest) String() string
type PizzaEvaluationResponse ¶
type PizzaEvaluationResponse struct { StarsRating int32 `protobuf:"varint,1,opt,name=stars_rating,json=starsRating,proto3" json:"stars_rating,omitempty"` // contains filtered or unexported fields }
func (*PizzaEvaluationResponse) Descriptor
deprecated
func (*PizzaEvaluationResponse) Descriptor() ([]byte, []int)
Deprecated: Use PizzaEvaluationResponse.ProtoReflect.Descriptor instead.
func (*PizzaEvaluationResponse) GetStarsRating ¶
func (x *PizzaEvaluationResponse) GetStarsRating() int32
func (*PizzaEvaluationResponse) ProtoMessage ¶
func (*PizzaEvaluationResponse) ProtoMessage()
func (*PizzaEvaluationResponse) ProtoReflect ¶
func (x *PizzaEvaluationResponse) ProtoReflect() protoreflect.Message
func (*PizzaEvaluationResponse) Reset ¶
func (x *PizzaEvaluationResponse) Reset()
func (*PizzaEvaluationResponse) String ¶
func (x *PizzaEvaluationResponse) String() string
type StatusRequest ¶
type StatusRequest struct {
// contains filtered or unexported fields
}
func (*StatusRequest) Descriptor
deprecated
func (*StatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.
func (*StatusRequest) ProtoMessage ¶
func (*StatusRequest) ProtoMessage()
func (*StatusRequest) ProtoReflect ¶
func (x *StatusRequest) ProtoReflect() protoreflect.Message
func (*StatusRequest) Reset ¶
func (x *StatusRequest) Reset()
func (*StatusRequest) String ¶
func (x *StatusRequest) String() string
type StatusResponse ¶
type StatusResponse struct { Ready bool `protobuf:"varint,1,opt,name=ready,proto3" json:"ready,omitempty"` // contains filtered or unexported fields }
func (*StatusResponse) Descriptor
deprecated
func (*StatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.
func (*StatusResponse) GetReady ¶
func (x *StatusResponse) GetReady() bool
func (*StatusResponse) ProtoMessage ¶
func (*StatusResponse) ProtoMessage()
func (*StatusResponse) ProtoReflect ¶
func (x *StatusResponse) ProtoReflect() protoreflect.Message
func (*StatusResponse) Reset ¶
func (x *StatusResponse) Reset()
func (*StatusResponse) String ¶
func (x *StatusResponse) String() string
type UnimplementedGRPCServer ¶
type UnimplementedGRPCServer struct{}
UnimplementedGRPCServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedGRPCServer) EvaluatePizza ¶
func (UnimplementedGRPCServer) EvaluatePizza(context.Context, *PizzaEvaluationRequest) (*PizzaEvaluationResponse, error)
func (UnimplementedGRPCServer) Status ¶
func (UnimplementedGRPCServer) Status(context.Context, *StatusRequest) (*StatusResponse, error)
type UnsafeGRPCServer ¶
type UnsafeGRPCServer interface {
// contains filtered or unexported methods
}
UnsafeGRPCServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GRPCServer will result in compilation errors.