Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAuctionServiceServer(s grpc.ServiceRegistrar, srv AuctionServiceServer)
- type Ack
- type AuctionServiceClient
- type AuctionServiceServer
- type AuctionService_ConnectionStreamClient
- type AuctionService_ConnectionStreamServer
- type BackupStream
- func (*BackupStream) Descriptor() ([]byte, []int)deprecated
- func (x *BackupStream) GetBackup() map[int32]float32
- func (x *BackupStream) GetMessage() string
- func (*BackupStream) ProtoMessage()
- func (x *BackupStream) ProtoReflect() protoreflect.Message
- func (x *BackupStream) Reset()
- func (x *BackupStream) String() string
- type BidAmount
- func (*BidAmount) Descriptor() ([]byte, []int)deprecated
- func (x *BidAmount) GetAmount() float32
- func (x *BidAmount) GetClientID() int32
- func (x *BidAmount) GetClientName() string
- func (*BidAmount) ProtoMessage()
- func (x *BidAmount) ProtoReflect() protoreflect.Message
- func (x *BidAmount) Reset()
- func (x *BidAmount) String() string
- type Outcome
- func (*Outcome) Descriptor() ([]byte, []int)deprecated
- func (x *Outcome) GetAmount() float32
- func (x *Outcome) GetBidDone() bool
- func (x *Outcome) GetClientName() string
- func (*Outcome) ProtoMessage()
- func (x *Outcome) ProtoReflect() protoreflect.Message
- func (x *Outcome) Reset()
- func (x *Outcome) String() string
- type UnimplementedAuctionServiceServer
- type UnsafeAuctionServiceServer
- type Void
Constants ¶
const ( AuctionService_Bid_FullMethodName = "/proto.AuctionService/Bid" AuctionService_Result_FullMethodName = "/proto.AuctionService/Result" AuctionService_ConnectionStream_FullMethodName = "/proto.AuctionService/connectionStream" )
Variables ¶
var AuctionService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.AuctionService", HandlerType: (*AuctionServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Bid", Handler: _AuctionService_Bid_Handler, }, { MethodName: "Result", Handler: _AuctionService_Result_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "connectionStream", Handler: _AuctionService_ConnectionStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "proto/auction.proto", }
AuctionService_ServiceDesc is the grpc.ServiceDesc for AuctionService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_auction_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuctionServiceServer ¶
func RegisterAuctionServiceServer(s grpc.ServiceRegistrar, srv AuctionServiceServer)
Types ¶
type Ack ¶
type Ack struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` ClientID int32 `protobuf:"varint,2,opt,name=clientID,proto3" json:"clientID,omitempty"` // contains filtered or unexported fields }
func (*Ack) Descriptor
deprecated
func (*Ack) GetClientID ¶
func (*Ack) GetMessage ¶
func (*Ack) ProtoMessage ¶
func (*Ack) ProtoMessage()
func (*Ack) ProtoReflect ¶
func (x *Ack) ProtoReflect() protoreflect.Message
type AuctionServiceClient ¶
type AuctionServiceClient interface { Bid(ctx context.Context, in *BidAmount, opts ...grpc.CallOption) (*Ack, error) Result(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Outcome, error) ConnectionStream(ctx context.Context, opts ...grpc.CallOption) (AuctionService_ConnectionStreamClient, error) }
AuctionServiceClient is the client API for AuctionService 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 NewAuctionServiceClient ¶
func NewAuctionServiceClient(cc grpc.ClientConnInterface) AuctionServiceClient
type AuctionServiceServer ¶
type AuctionServiceServer interface { Bid(context.Context, *BidAmount) (*Ack, error) Result(context.Context, *Void) (*Outcome, error) ConnectionStream(AuctionService_ConnectionStreamServer) error // contains filtered or unexported methods }
AuctionServiceServer is the server API for AuctionService service. All implementations must embed UnimplementedAuctionServiceServer for forward compatibility
type AuctionService_ConnectionStreamClient ¶
type AuctionService_ConnectionStreamClient interface { Send(*BackupStream) error Recv() (*BackupStream, error) grpc.ClientStream }
type AuctionService_ConnectionStreamServer ¶
type AuctionService_ConnectionStreamServer interface { Send(*BackupStream) error Recv() (*BackupStream, error) grpc.ServerStream }
type BackupStream ¶
type BackupStream struct { Backup map[int32]float32 `` /* 156-byte string literal not displayed */ Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*BackupStream) Descriptor
deprecated
func (*BackupStream) Descriptor() ([]byte, []int)
Deprecated: Use BackupStream.ProtoReflect.Descriptor instead.
func (*BackupStream) GetBackup ¶
func (x *BackupStream) GetBackup() map[int32]float32
func (*BackupStream) GetMessage ¶
func (x *BackupStream) GetMessage() string
func (*BackupStream) ProtoMessage ¶
func (*BackupStream) ProtoMessage()
func (*BackupStream) ProtoReflect ¶
func (x *BackupStream) ProtoReflect() protoreflect.Message
func (*BackupStream) Reset ¶
func (x *BackupStream) Reset()
func (*BackupStream) String ¶
func (x *BackupStream) String() string
type BidAmount ¶
type BidAmount struct { ClientID int32 `protobuf:"varint,1,opt,name=clientID,proto3" json:"clientID,omitempty"` ClientName string `protobuf:"bytes,2,opt,name=clientName,proto3" json:"clientName,omitempty"` Amount float32 `protobuf:"fixed32,3,opt,name=amount,proto3" json:"amount,omitempty"` // contains filtered or unexported fields }
func (*BidAmount) Descriptor
deprecated
func (*BidAmount) GetClientID ¶
func (*BidAmount) GetClientName ¶
func (*BidAmount) ProtoMessage ¶
func (*BidAmount) ProtoMessage()
func (*BidAmount) ProtoReflect ¶
func (x *BidAmount) ProtoReflect() protoreflect.Message
type Outcome ¶
type Outcome struct { Amount float32 `protobuf:"fixed32,1,opt,name=amount,proto3" json:"amount,omitempty"` ClientName string `protobuf:"bytes,2,opt,name=clientName,proto3" json:"clientName,omitempty"` BidDone bool `protobuf:"varint,3,opt,name=BidDone,proto3" json:"BidDone,omitempty"` // contains filtered or unexported fields }
func (*Outcome) Descriptor
deprecated
func (*Outcome) GetBidDone ¶
func (*Outcome) GetClientName ¶
func (*Outcome) ProtoMessage ¶
func (*Outcome) ProtoMessage()
func (*Outcome) ProtoReflect ¶
func (x *Outcome) ProtoReflect() protoreflect.Message
type UnimplementedAuctionServiceServer ¶
type UnimplementedAuctionServiceServer struct { }
UnimplementedAuctionServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAuctionServiceServer) ConnectionStream ¶
func (UnimplementedAuctionServiceServer) ConnectionStream(AuctionService_ConnectionStreamServer) error
type UnsafeAuctionServiceServer ¶
type UnsafeAuctionServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAuctionServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuctionServiceServer will result in compilation errors.
type Void ¶
type Void struct {
// contains filtered or unexported fields
}
func (*Void) Descriptor
deprecated
func (*Void) ProtoMessage ¶
func (*Void) ProtoMessage()
func (*Void) ProtoReflect ¶
func (x *Void) ProtoReflect() protoreflect.Message