Documentation ¶
Index ¶
- Variables
- func RegisterFrontendServer(s grpc.ServiceRegistrar, srv FrontendServer)
- func RegisterServerServer(s grpc.ServiceRegistrar, srv ServerServer)
- type Ack
- type BidRequest
- func (*BidRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BidRequest) GetAmount() int32
- func (x *BidRequest) GetName() string
- func (x *BidRequest) GetProcessID() int32
- func (*BidRequest) ProtoMessage()
- func (x *BidRequest) ProtoReflect() protoreflect.Message
- func (x *BidRequest) Reset()
- func (x *BidRequest) String() string
- type BidResult
- func (*BidResult) Descriptor() ([]byte, []int)deprecated
- func (x *BidResult) GetAmount() int32
- func (x *BidResult) GetAuctionStatus() string
- func (x *BidResult) GetName() string
- func (*BidResult) ProtoMessage()
- func (x *BidResult) ProtoReflect() protoreflect.Message
- func (x *BidResult) Reset()
- func (x *BidResult) String() string
- type FrontendClient
- type FrontendServer
- type ServerClient
- type ServerServer
- type UnimplementedFrontendServer
- type UnimplementedServerServer
- type UnsafeFrontendServer
- type UnsafeServerServer
- type Void
Constants ¶
This section is empty.
Variables ¶
var File_proto_proto_proto protoreflect.FileDescriptor
var Frontend_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.Frontend", HandlerType: (*FrontendServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Bid", Handler: _Frontend_Bid_Handler, }, { MethodName: "Result", Handler: _Frontend_Result_Handler, }, { MethodName: "StartAuction", Handler: _Frontend_StartAuction_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/proto.proto", }
Frontend_ServiceDesc is the grpc.ServiceDesc for Frontend service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Server_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.Server", HandlerType: (*ServerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UpdateHighestBid", Handler: _Server_UpdateHighestBid_Handler, }, { MethodName: "GetHighestBid", Handler: _Server_GetHighestBid_Handler, }, { MethodName: "StartAuction", Handler: _Server_StartAuction_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/proto.proto", }
Server_ServiceDesc is the grpc.ServiceDesc for Server service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterFrontendServer ¶
func RegisterFrontendServer(s grpc.ServiceRegistrar, srv FrontendServer)
func RegisterServerServer ¶
func RegisterServerServer(s grpc.ServiceRegistrar, srv ServerServer)
Types ¶
type Ack ¶
type Ack struct { Ack string `protobuf:"bytes,1,opt,name=ack,proto3" json:"ack,omitempty"` // contains filtered or unexported fields }
func (*Ack) Descriptor
deprecated
func (*Ack) ProtoMessage ¶
func (*Ack) ProtoMessage()
func (*Ack) ProtoReflect ¶
func (x *Ack) ProtoReflect() protoreflect.Message
type BidRequest ¶
type BidRequest struct { Amount int32 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` ProcessID int32 `protobuf:"varint,3,opt,name=processID,proto3" json:"processID,omitempty"` // contains filtered or unexported fields }
func (*BidRequest) Descriptor
deprecated
func (*BidRequest) Descriptor() ([]byte, []int)
Deprecated: Use BidRequest.ProtoReflect.Descriptor instead.
func (*BidRequest) GetAmount ¶
func (x *BidRequest) GetAmount() int32
func (*BidRequest) GetName ¶
func (x *BidRequest) GetName() string
func (*BidRequest) GetProcessID ¶
func (x *BidRequest) GetProcessID() int32
func (*BidRequest) ProtoMessage ¶
func (*BidRequest) ProtoMessage()
func (*BidRequest) ProtoReflect ¶
func (x *BidRequest) ProtoReflect() protoreflect.Message
func (*BidRequest) Reset ¶
func (x *BidRequest) Reset()
func (*BidRequest) String ¶
func (x *BidRequest) String() string
type BidResult ¶
type BidResult struct { Amount int32 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` AuctionStatus string `protobuf:"bytes,3,opt,name=auctionStatus,proto3" json:"auctionStatus,omitempty"` // contains filtered or unexported fields }
func (*BidResult) Descriptor
deprecated
func (*BidResult) GetAuctionStatus ¶
func (*BidResult) ProtoMessage ¶
func (*BidResult) ProtoMessage()
func (*BidResult) ProtoReflect ¶
func (x *BidResult) ProtoReflect() protoreflect.Message
type FrontendClient ¶
type FrontendClient interface { Bid(ctx context.Context, in *BidRequest, opts ...grpc.CallOption) (*Ack, error) Result(ctx context.Context, in *Void, opts ...grpc.CallOption) (*BidResult, error) StartAuction(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Ack, error) }
FrontendClient is the client API for Frontend 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 NewFrontendClient ¶
func NewFrontendClient(cc grpc.ClientConnInterface) FrontendClient
type FrontendServer ¶
type FrontendServer interface { Bid(context.Context, *BidRequest) (*Ack, error) Result(context.Context, *Void) (*BidResult, error) StartAuction(context.Context, *Void) (*Ack, error) // contains filtered or unexported methods }
FrontendServer is the server API for Frontend service. All implementations must embed UnimplementedFrontendServer for forward compatibility
type ServerClient ¶
type ServerClient interface { UpdateHighestBid(ctx context.Context, in *BidRequest, opts ...grpc.CallOption) (*Ack, error) GetHighestBid(ctx context.Context, in *Void, opts ...grpc.CallOption) (*BidResult, error) StartAuction(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Ack, error) }
ServerClient is the client API for Server 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 NewServerClient ¶
func NewServerClient(cc grpc.ClientConnInterface) ServerClient
type ServerServer ¶
type ServerServer interface { UpdateHighestBid(context.Context, *BidRequest) (*Ack, error) GetHighestBid(context.Context, *Void) (*BidResult, error) StartAuction(context.Context, *Void) (*Ack, error) // contains filtered or unexported methods }
ServerServer is the server API for Server service. All implementations must embed UnimplementedServerServer for forward compatibility
type UnimplementedFrontendServer ¶
type UnimplementedFrontendServer struct { }
UnimplementedFrontendServer must be embedded to have forward compatible implementations.
func (UnimplementedFrontendServer) Bid ¶
func (UnimplementedFrontendServer) Bid(context.Context, *BidRequest) (*Ack, error)
func (UnimplementedFrontendServer) StartAuction ¶
type UnimplementedServerServer ¶
type UnimplementedServerServer struct { }
UnimplementedServerServer must be embedded to have forward compatible implementations.
func (UnimplementedServerServer) GetHighestBid ¶
func (UnimplementedServerServer) StartAuction ¶
func (UnimplementedServerServer) UpdateHighestBid ¶
func (UnimplementedServerServer) UpdateHighestBid(context.Context, *BidRequest) (*Ack, error)
type UnsafeFrontendServer ¶
type UnsafeFrontendServer interface {
// contains filtered or unexported methods
}
UnsafeFrontendServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FrontendServer will result in compilation errors.
type UnsafeServerServer ¶
type UnsafeServerServer interface {
// contains filtered or unexported methods
}
UnsafeServerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServerServer 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