Documentation ¶
Index ¶
- Variables
- func RegisterAuctionServer(s grpc.ServiceRegistrar, srv AuctionServer)
- type Acknowledgement
- type AuctionClient
- type AuctionServer
- type BidMessage
- func (*BidMessage) Descriptor() ([]byte, []int)deprecated
- func (x *BidMessage) GetAuctionId() int32
- func (x *BidMessage) GetBid() int32
- func (x *BidMessage) GetBidder() string
- func (*BidMessage) ProtoMessage()
- func (x *BidMessage) ProtoReflect() protoreflect.Message
- func (x *BidMessage) Reset()
- func (x *BidMessage) String() string
- type StatusReply
- func (*StatusReply) Descriptor() ([]byte, []int)deprecated
- func (x *StatusReply) GetActive() bool
- func (x *StatusReply) GetBidder() string
- func (x *StatusReply) GetHighestBid() int32
- func (*StatusReply) ProtoMessage()
- func (x *StatusReply) ProtoReflect() protoreflect.Message
- func (x *StatusReply) Reset()
- func (x *StatusReply) String() string
- type StatusRequest
- type UnimplementedAuctionServer
- type UnsafeAuctionServer
Constants ¶
This section is empty.
Variables ¶
var Auction_ServiceDesc = grpc.ServiceDesc{ ServiceName: "auction.auction", HandlerType: (*AuctionServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "bid", Handler: _Auction_Bid_Handler, }, { MethodName: "status", Handler: _Auction_Status_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "auction/auction.proto", }
Auction_ServiceDesc is the grpc.ServiceDesc for Auction service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_auction_auction_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuctionServer ¶
func RegisterAuctionServer(s grpc.ServiceRegistrar, srv AuctionServer)
Types ¶
type Acknowledgement ¶
type Acknowledgement struct { Ack int32 `protobuf:"varint,1,opt,name=ack,proto3" json:"ack,omitempty"` // contains filtered or unexported fields }
func (*Acknowledgement) Descriptor
deprecated
func (*Acknowledgement) Descriptor() ([]byte, []int)
Deprecated: Use Acknowledgement.ProtoReflect.Descriptor instead.
func (*Acknowledgement) GetAck ¶
func (x *Acknowledgement) GetAck() int32
func (*Acknowledgement) ProtoMessage ¶
func (*Acknowledgement) ProtoMessage()
func (*Acknowledgement) ProtoReflect ¶
func (x *Acknowledgement) ProtoReflect() protoreflect.Message
func (*Acknowledgement) Reset ¶
func (x *Acknowledgement) Reset()
func (*Acknowledgement) String ¶
func (x *Acknowledgement) String() string
type AuctionClient ¶
type AuctionClient interface { Bid(ctx context.Context, in *BidMessage, opts ...grpc.CallOption) (*Acknowledgement, error) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusReply, error) }
AuctionClient is the client API for Auction 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 NewAuctionClient ¶
func NewAuctionClient(cc grpc.ClientConnInterface) AuctionClient
type AuctionServer ¶
type AuctionServer interface { Bid(context.Context, *BidMessage) (*Acknowledgement, error) Status(context.Context, *StatusRequest) (*StatusReply, error) // contains filtered or unexported methods }
AuctionServer is the server API for Auction service. All implementations must embed UnimplementedAuctionServer for forward compatibility
type BidMessage ¶
type BidMessage struct { AuctionId int32 `protobuf:"varint,1,opt,name=auctionId,proto3" json:"auctionId,omitempty"` Bid int32 `protobuf:"varint,2,opt,name=bid,proto3" json:"bid,omitempty"` Bidder string `protobuf:"bytes,3,opt,name=bidder,proto3" json:"bidder,omitempty"` // contains filtered or unexported fields }
func (*BidMessage) Descriptor
deprecated
func (*BidMessage) Descriptor() ([]byte, []int)
Deprecated: Use BidMessage.ProtoReflect.Descriptor instead.
func (*BidMessage) GetAuctionId ¶
func (x *BidMessage) GetAuctionId() int32
func (*BidMessage) GetBid ¶
func (x *BidMessage) GetBid() int32
func (*BidMessage) GetBidder ¶
func (x *BidMessage) GetBidder() string
func (*BidMessage) ProtoMessage ¶
func (*BidMessage) ProtoMessage()
func (*BidMessage) ProtoReflect ¶
func (x *BidMessage) ProtoReflect() protoreflect.Message
func (*BidMessage) Reset ¶
func (x *BidMessage) Reset()
func (*BidMessage) String ¶
func (x *BidMessage) String() string
type StatusReply ¶
type StatusReply struct { Active bool `protobuf:"varint,1,opt,name=active,proto3" json:"active,omitempty"` HighestBid int32 `protobuf:"varint,2,opt,name=highestBid,proto3" json:"highestBid,omitempty"` Bidder string `protobuf:"bytes,3,opt,name=bidder,proto3" json:"bidder,omitempty"` // contains filtered or unexported fields }
func (*StatusReply) Descriptor
deprecated
func (*StatusReply) Descriptor() ([]byte, []int)
Deprecated: Use StatusReply.ProtoReflect.Descriptor instead.
func (*StatusReply) GetActive ¶
func (x *StatusReply) GetActive() bool
func (*StatusReply) GetBidder ¶
func (x *StatusReply) GetBidder() string
func (*StatusReply) GetHighestBid ¶
func (x *StatusReply) GetHighestBid() int32
func (*StatusReply) ProtoMessage ¶
func (*StatusReply) ProtoMessage()
func (*StatusReply) ProtoReflect ¶
func (x *StatusReply) ProtoReflect() protoreflect.Message
func (*StatusReply) Reset ¶
func (x *StatusReply) Reset()
func (*StatusReply) String ¶
func (x *StatusReply) String() string
type StatusRequest ¶
type StatusRequest struct { AuctionId int32 `protobuf:"varint,1,opt,name=auctionId,proto3" json:"auctionId,omitempty"` // contains filtered or unexported fields }
func (*StatusRequest) Descriptor
deprecated
func (*StatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.
func (*StatusRequest) GetAuctionId ¶
func (x *StatusRequest) GetAuctionId() int32
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 UnimplementedAuctionServer ¶
type UnimplementedAuctionServer struct { }
UnimplementedAuctionServer must be embedded to have forward compatible implementations.
func (UnimplementedAuctionServer) Bid ¶
func (UnimplementedAuctionServer) Bid(context.Context, *BidMessage) (*Acknowledgement, error)
func (UnimplementedAuctionServer) Status ¶
func (UnimplementedAuctionServer) Status(context.Context, *StatusRequest) (*StatusReply, error)
type UnsafeAuctionServer ¶
type UnsafeAuctionServer interface {
// contains filtered or unexported methods
}
UnsafeAuctionServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuctionServer will result in compilation errors.