Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCandyStoreServer(s grpc.ServiceRegistrar, srv CandyStoreServer)
- type BuyRequest
- type Candy
- type CandyStoreClient
- type CandyStoreServer
- type CandyStore_StreamCandyFromClient
- type CandyStore_StreamCandyFromServer
- type CandyStore_StreamCandyToClient
- type CandyStore_StreamCandyToServer
- type UnimplementedCandyStoreServer
- type UnsafeCandyStoreServer
Constants ¶
const ( CandyStore_Buy_FullMethodName = "/candystore.CandyStore/Buy" CandyStore_StreamCandyTo_FullMethodName = "/candystore.CandyStore/StreamCandyTo" CandyStore_StreamCandyFrom_FullMethodName = "/candystore.CandyStore/StreamCandyFrom" )
Variables ¶
var CandyStore_ServiceDesc = grpc.ServiceDesc{ ServiceName: "candystore.CandyStore", HandlerType: (*CandyStoreServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Buy", Handler: _CandyStore_Buy_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "StreamCandyTo", Handler: _CandyStore_StreamCandyTo_Handler, ClientStreams: true, }, { StreamName: "StreamCandyFrom", Handler: _CandyStore_StreamCandyFrom_Handler, ServerStreams: true, }, }, Metadata: "candystore.proto", }
CandyStore_ServiceDesc is the grpc.ServiceDesc for CandyStore service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_candystore_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCandyStoreServer ¶
func RegisterCandyStoreServer(s grpc.ServiceRegistrar, srv CandyStoreServer)
Types ¶
type BuyRequest ¶
type BuyRequest struct { Hops int64 `protobuf:"varint,1,opt,name=hops,proto3" json:"hops,omitempty"` // contains filtered or unexported fields }
func (*BuyRequest) Descriptor
deprecated
func (*BuyRequest) Descriptor() ([]byte, []int)
Deprecated: Use BuyRequest.ProtoReflect.Descriptor instead.
func (*BuyRequest) GetHops ¶
func (x *BuyRequest) GetHops() int64
func (*BuyRequest) ProtoMessage ¶
func (*BuyRequest) ProtoMessage()
func (*BuyRequest) ProtoReflect ¶
func (x *BuyRequest) ProtoReflect() protoreflect.Message
func (*BuyRequest) Reset ¶
func (x *BuyRequest) Reset()
func (*BuyRequest) String ¶
func (x *BuyRequest) String() string
type Candy ¶
type Candy struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*Candy) Descriptor
deprecated
func (*Candy) ProtoMessage ¶
func (*Candy) ProtoMessage()
func (*Candy) ProtoReflect ¶
func (x *Candy) ProtoReflect() protoreflect.Message
type CandyStoreClient ¶
type CandyStoreClient interface { Buy(ctx context.Context, in *BuyRequest, opts ...grpc.CallOption) (*Candy, error) StreamCandyTo(ctx context.Context, opts ...grpc.CallOption) (CandyStore_StreamCandyToClient, error) StreamCandyFrom(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (CandyStore_StreamCandyFromClient, error) }
CandyStoreClient is the client API for CandyStore 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 NewCandyStoreClient ¶
func NewCandyStoreClient(cc grpc.ClientConnInterface) CandyStoreClient
type CandyStoreServer ¶
type CandyStoreServer interface { Buy(context.Context, *BuyRequest) (*Candy, error) StreamCandyTo(CandyStore_StreamCandyToServer) error StreamCandyFrom(*emptypb.Empty, CandyStore_StreamCandyFromServer) error // contains filtered or unexported methods }
CandyStoreServer is the server API for CandyStore service. All implementations must embed UnimplementedCandyStoreServer for forward compatibility
type CandyStore_StreamCandyFromClient ¶
type CandyStore_StreamCandyFromClient interface { Recv() (*Candy, error) grpc.ClientStream }
type CandyStore_StreamCandyFromServer ¶
type CandyStore_StreamCandyFromServer interface { Send(*Candy) error grpc.ServerStream }
type UnimplementedCandyStoreServer ¶
type UnimplementedCandyStoreServer struct { }
UnimplementedCandyStoreServer must be embedded to have forward compatible implementations.
func (UnimplementedCandyStoreServer) Buy ¶
func (UnimplementedCandyStoreServer) Buy(context.Context, *BuyRequest) (*Candy, error)
func (UnimplementedCandyStoreServer) StreamCandyFrom ¶
func (UnimplementedCandyStoreServer) StreamCandyFrom(*emptypb.Empty, CandyStore_StreamCandyFromServer) error
func (UnimplementedCandyStoreServer) StreamCandyTo ¶
func (UnimplementedCandyStoreServer) StreamCandyTo(CandyStore_StreamCandyToServer) error
type UnsafeCandyStoreServer ¶
type UnsafeCandyStoreServer interface {
// contains filtered or unexported methods
}
UnsafeCandyStoreServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CandyStoreServer will result in compilation errors.