Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterGRPCServer(s grpc.ServiceRegistrar, srv GRPCServer)
- type GRPCClient
- type GRPCServer
- type PizzaRatingRequest
- func (*PizzaRatingRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PizzaRatingRequest) GetDough() string
- func (x *PizzaRatingRequest) GetIngredients() []string
- func (*PizzaRatingRequest) ProtoMessage()
- func (x *PizzaRatingRequest) ProtoReflect() protoreflect.Message
- func (x *PizzaRatingRequest) Reset()
- func (x *PizzaRatingRequest) String() string
- type PizzaRatingResponse
- func (*PizzaRatingResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PizzaRatingResponse) GetStarsRating() int32
- func (*PizzaRatingResponse) ProtoMessage()
- func (x *PizzaRatingResponse) ProtoReflect() protoreflect.Message
- func (x *PizzaRatingResponse) Reset()
- func (x *PizzaRatingResponse) String() string
- type StatusRequest
- type StatusResponse
- type UnimplementedGRPCServer
- type UnsafeGRPCServer
Constants ¶
const ( GRPC_Status_FullMethodName = "/quickpizza.GRPC/Status" GRPC_RatePizza_FullMethodName = "/quickpizza.GRPC/RatePizza" )
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: "RatePizza", Handler: _GRPC_RatePizza_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) RatePizza(ctx context.Context, in *PizzaRatingRequest, opts ...grpc.CallOption) (*PizzaRatingResponse, 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) RatePizza(context.Context, *PizzaRatingRequest) (*PizzaRatingResponse, error) // contains filtered or unexported methods }
GRPCServer is the server API for GRPC service. All implementations must embed UnimplementedGRPCServer for forward compatibility.
type PizzaRatingRequest ¶ added in v0.11.4
type PizzaRatingRequest 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 (*PizzaRatingRequest) Descriptor
deprecated
added in
v0.11.4
func (*PizzaRatingRequest) Descriptor() ([]byte, []int)
Deprecated: Use PizzaRatingRequest.ProtoReflect.Descriptor instead.
func (*PizzaRatingRequest) GetDough ¶ added in v0.11.4
func (x *PizzaRatingRequest) GetDough() string
func (*PizzaRatingRequest) GetIngredients ¶ added in v0.11.4
func (x *PizzaRatingRequest) GetIngredients() []string
func (*PizzaRatingRequest) ProtoMessage ¶ added in v0.11.4
func (*PizzaRatingRequest) ProtoMessage()
func (*PizzaRatingRequest) ProtoReflect ¶ added in v0.11.4
func (x *PizzaRatingRequest) ProtoReflect() protoreflect.Message
func (*PizzaRatingRequest) Reset ¶ added in v0.11.4
func (x *PizzaRatingRequest) Reset()
func (*PizzaRatingRequest) String ¶ added in v0.11.4
func (x *PizzaRatingRequest) String() string
type PizzaRatingResponse ¶ added in v0.11.4
type PizzaRatingResponse struct { StarsRating int32 `protobuf:"varint,1,opt,name=stars_rating,json=starsRating,proto3" json:"stars_rating,omitempty"` // contains filtered or unexported fields }
func (*PizzaRatingResponse) Descriptor
deprecated
added in
v0.11.4
func (*PizzaRatingResponse) Descriptor() ([]byte, []int)
Deprecated: Use PizzaRatingResponse.ProtoReflect.Descriptor instead.
func (*PizzaRatingResponse) GetStarsRating ¶ added in v0.11.4
func (x *PizzaRatingResponse) GetStarsRating() int32
func (*PizzaRatingResponse) ProtoMessage ¶ added in v0.11.4
func (*PizzaRatingResponse) ProtoMessage()
func (*PizzaRatingResponse) ProtoReflect ¶ added in v0.11.4
func (x *PizzaRatingResponse) ProtoReflect() protoreflect.Message
func (*PizzaRatingResponse) Reset ¶ added in v0.11.4
func (x *PizzaRatingResponse) Reset()
func (*PizzaRatingResponse) String ¶ added in v0.11.4
func (x *PizzaRatingResponse) 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) RatePizza ¶ added in v0.11.4
func (UnimplementedGRPCServer) RatePizza(context.Context, *PizzaRatingRequest) (*PizzaRatingResponse, 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.