Documentation ¶
Overview ¶
Package pb includes protobufs for this example.
Index ¶
- Variables
- func DRPCRegisterCookieMonster(mux drpc.Mux, impl DRPCCookieMonsterServer) error
- func RegisterCookieMonsterServer(s grpc.ServiceRegistrar, srv CookieMonsterServer)
- type Cookie
- type CookieMonsterClient
- type CookieMonsterServer
- type Cookie_Type
- func (Cookie_Type) Descriptor() protoreflect.EnumDescriptor
- func (x Cookie_Type) Enum() *Cookie_Type
- func (Cookie_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x Cookie_Type) Number() protoreflect.EnumNumber
- func (x Cookie_Type) String() string
- func (Cookie_Type) Type() protoreflect.EnumType
- type Crumbs
- type DRPCCookieMonsterClient
- type DRPCCookieMonsterDescription
- type DRPCCookieMonsterServer
- type DRPCCookieMonsterUnimplementedServer
- type DRPCCookieMonster_EatCookieStream
- type UnimplementedCookieMonsterServer
- type UnsafeCookieMonsterServer
Constants ¶
This section is empty.
Variables ¶
var ( Cookie_Type_name = map[int32]string{ 0: "Sugar", 1: "Oatmeal", 2: "Chocolate", } Cookie_Type_value = map[string]int32{ "Sugar": 0, "Oatmeal": 1, "Chocolate": 2, } )
Enum value maps for Cookie_Type.
var CookieMonster_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sesamestreet.CookieMonster", HandlerType: (*CookieMonsterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "EatCookie", Handler: _CookieMonster_EatCookie_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sesamestreet.proto", }
CookieMonster_ServiceDesc is the grpc.ServiceDesc for CookieMonster service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_sesamestreet_proto protoreflect.FileDescriptor
Functions ¶
func DRPCRegisterCookieMonster ¶
func DRPCRegisterCookieMonster(mux drpc.Mux, impl DRPCCookieMonsterServer) error
func RegisterCookieMonsterServer ¶
func RegisterCookieMonsterServer(s grpc.ServiceRegistrar, srv CookieMonsterServer)
Types ¶
type Cookie ¶
type Cookie struct { Type Cookie_Type `protobuf:"varint,1,opt,name=type,proto3,enum=sesamestreet.Cookie_Type" json:"type,omitempty"` // contains filtered or unexported fields }
func (*Cookie) Descriptor
deprecated
func (*Cookie) GetType ¶
func (x *Cookie) GetType() Cookie_Type
func (*Cookie) ProtoMessage ¶
func (*Cookie) ProtoMessage()
func (*Cookie) ProtoReflect ¶
func (x *Cookie) ProtoReflect() protoreflect.Message
type CookieMonsterClient ¶
type CookieMonsterClient interface {
EatCookie(ctx context.Context, in *Cookie, opts ...grpc.CallOption) (*Crumbs, error)
}
CookieMonsterClient is the client API for CookieMonster 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 NewCookieMonsterClient ¶
func NewCookieMonsterClient(cc grpc.ClientConnInterface) CookieMonsterClient
type CookieMonsterServer ¶
type CookieMonsterServer interface { EatCookie(context.Context, *Cookie) (*Crumbs, error) // contains filtered or unexported methods }
CookieMonsterServer is the server API for CookieMonster service. All implementations must embed UnimplementedCookieMonsterServer for forward compatibility
type Cookie_Type ¶
type Cookie_Type int32
const ( Cookie_Sugar Cookie_Type = 0 Cookie_Oatmeal Cookie_Type = 1 Cookie_Chocolate Cookie_Type = 2 )
func (Cookie_Type) Descriptor ¶
func (Cookie_Type) Descriptor() protoreflect.EnumDescriptor
func (Cookie_Type) Enum ¶
func (x Cookie_Type) Enum() *Cookie_Type
func (Cookie_Type) EnumDescriptor
deprecated
func (Cookie_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use Cookie_Type.Descriptor instead.
func (Cookie_Type) Number ¶
func (x Cookie_Type) Number() protoreflect.EnumNumber
func (Cookie_Type) String ¶
func (x Cookie_Type) String() string
func (Cookie_Type) Type ¶
func (Cookie_Type) Type() protoreflect.EnumType
type Crumbs ¶
type Crumbs struct { Cookie *Cookie `protobuf:"bytes,1,opt,name=cookie,proto3" json:"cookie,omitempty"` // contains filtered or unexported fields }
func (*Crumbs) Descriptor
deprecated
func (*Crumbs) ProtoMessage ¶
func (*Crumbs) ProtoMessage()
func (*Crumbs) ProtoReflect ¶
func (x *Crumbs) ProtoReflect() protoreflect.Message
type DRPCCookieMonsterClient ¶
type DRPCCookieMonsterClient interface { DRPCConn() drpc.Conn EatCookie(ctx context.Context, in *Cookie) (*Crumbs, error) }
func NewDRPCCookieMonsterClient ¶
func NewDRPCCookieMonsterClient(cc drpc.Conn) DRPCCookieMonsterClient
type DRPCCookieMonsterDescription ¶
type DRPCCookieMonsterDescription struct{}
func (DRPCCookieMonsterDescription) NumMethods ¶
func (DRPCCookieMonsterDescription) NumMethods() int
type DRPCCookieMonsterServer ¶
type DRPCCookieMonsterUnimplementedServer ¶
type DRPCCookieMonsterUnimplementedServer struct{}
type UnimplementedCookieMonsterServer ¶
type UnimplementedCookieMonsterServer struct { }
UnimplementedCookieMonsterServer must be embedded to have forward compatible implementations.
type UnsafeCookieMonsterServer ¶
type UnsafeCookieMonsterServer interface {
// contains filtered or unexported methods
}
UnsafeCookieMonsterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CookieMonsterServer will result in compilation errors.