Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var File_my_service_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Ignored ¶
type Ignored struct {
// contains filtered or unexported fields
}
func (*Ignored) Descriptor
deprecated
func (*Ignored) ProtoMessage ¶
func (*Ignored) ProtoMessage()
func (*Ignored) ProtoReflect ¶
func (x *Ignored) ProtoReflect() protoreflect.Message
type MyRequest ¶
type MyRequest struct {
// contains filtered or unexported fields
}
func (*MyRequest) Descriptor
deprecated
func (*MyRequest) ProtoMessage ¶
func (*MyRequest) ProtoMessage()
func (*MyRequest) ProtoReflect ¶
func (x *MyRequest) ProtoReflect() protoreflect.Message
type MyResponse ¶
type MyResponse struct {
// contains filtered or unexported fields
}
func (*MyResponse) Descriptor
deprecated
func (*MyResponse) Descriptor() ([]byte, []int)
Deprecated: Use MyResponse.ProtoReflect.Descriptor instead.
func (*MyResponse) ProtoMessage ¶
func (*MyResponse) ProtoMessage()
func (*MyResponse) ProtoReflect ¶
func (x *MyResponse) ProtoReflect() protoreflect.Message
func (*MyResponse) Reset ¶
func (x *MyResponse) Reset()
func (*MyResponse) String ¶
func (x *MyResponse) String() string
type MyServiceClient ¶
type MyServiceClient interface { // A normal RPC - one request, one response. The request will be handled by the first available server NormalRPC(context.Context, *MyRequest, ...psrpc1.RequestOpt) (*MyResponse, error) // An RPC with a server affinity function for handler selection. IntensiveRPC(context.Context, *MyRequest, ...psrpc1.RequestOpt) (*MyResponse, error) // A multi-rpc - a client will send one request, and receive one response each from every server GetStats(context.Context, *MyRequest, ...psrpc1.RequestOpt) (<-chan *psrpc1.Response[*MyResponse], error) // An RPC with topics - a client can send one request, and receive one response from each server in one region GetRegionStats(context.Context, string, *MyRequest, ...psrpc1.RequestOpt) (<-chan *psrpc1.Response[*MyResponse], error) // A queue subscription - even if multiple clients are subscribed, only one will receive this update. // The request parameter (Ignored) will be ignored when generating go files. SubscribeProcessUpdate(context.Context) (psrpc1.Subscription[*MyUpdate], error) // A subscription with topics - every client subscribed to the topic will receive every update. // The request parameter (Ignored) will be ignored when generating go files. SubscribeUpdateRegionState(context.Context, string) (psrpc1.Subscription[*MyUpdate], error) }
func NewMyServiceClient ¶
func NewMyServiceClient(clientID string, bus psrpc1.MessageBus, opts ...psrpc1.ClientOpt) (MyServiceClient, error)
NewMyServiceClient creates a psrpc client that implements the MyServiceClient interface.
type MyServiceServer ¶
type MyServiceServer interface { // An RPC with topics - a client can send one request, and receive one response from each server in one region RegisterGetRegionStatsTopic(string) error DeregisterGetRegionStatsTopic(string) error // A queue subscription - even if multiple clients are subscribed, only one will receive this update. // The request parameter (Ignored) will be ignored when generating go files. PublishProcessUpdate(context.Context, *MyUpdate) error // A subscription with topics - every client subscribed to the topic will receive every update. // The request parameter (Ignored) will be ignored when generating go files. PublishUpdateRegionState(context.Context, string, *MyUpdate) error }
func NewMyServiceServer ¶
func NewMyServiceServer(serverID string, svc MyServiceServerImpl, bus psrpc1.MessageBus, opts ...psrpc1.ServerOpt) (MyServiceServer, error)
NewMyServiceServer builds a RPCServer that can be used to handle requests that are routed to the right method in the provided svc implementation.
type MyServiceServerImpl ¶
type MyServiceServerImpl interface { // A normal RPC - one request, one response. The request will be handled by the first available server NormalRPC(context.Context, *MyRequest) (*MyResponse, error) // An RPC with a server affinity function for handler selection. IntensiveRPC(context.Context, *MyRequest) (*MyResponse, error) IntensiveRPCAffinity(*MyRequest) float32 // A multi-rpc - a client will send one request, and receive one response each from every server GetStats(context.Context, *MyRequest) (*MyResponse, error) // An RPC with topics - a client can send one request, and receive one response from each server in one region GetRegionStats(context.Context, *MyRequest) (*MyResponse, error) }
type MyUpdate ¶
type MyUpdate struct {
// contains filtered or unexported fields
}
func (*MyUpdate) Descriptor
deprecated
func (*MyUpdate) ProtoMessage ¶
func (*MyUpdate) ProtoMessage()
func (*MyUpdate) ProtoReflect ¶
func (x *MyUpdate) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.