Documentation
¶
Index ¶
- Variables
- type Options
- func (*Options) Descriptor() ([]byte, []int)deprecated
- func (x *Options) GetAffinityFunc() bool
- func (x *Options) GetMulti() bool
- func (x *Options) GetQueue() bool
- func (x *Options) GetRouting() isOptions_Routing
- func (x *Options) GetStream() bool
- func (x *Options) GetSubscription() bool
- func (x *Options) GetTopicParams() *TopicParamOptions
- func (x *Options) GetTopics() bool
- func (x *Options) GetType() Routing
- func (*Options) ProtoMessage()
- func (x *Options) ProtoReflect() protoreflect.Message
- func (x *Options) Reset()
- func (x *Options) String() string
- type Options_AffinityFunc
- type Options_Multi
- type Options_Queue
- type Routing
- type TopicParamOptions
- func (*TopicParamOptions) Descriptor() ([]byte, []int)deprecated
- func (x *TopicParamOptions) GetGroup() string
- func (x *TopicParamOptions) GetNames() []string
- func (x *TopicParamOptions) GetSingleServer() bool
- func (x *TopicParamOptions) GetTyped() bool
- func (*TopicParamOptions) ProtoMessage()
- func (x *TopicParamOptions) ProtoReflect() protoreflect.Message
- func (x *TopicParamOptions) Reset()
- func (x *TopicParamOptions) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Routing_name = map[int32]string{ 0: "QUEUE", 1: "AFFINITY", 2: "MULTI", } Routing_value = map[string]int32{ "QUEUE": 0, "AFFINITY": 1, "MULTI": 2, } )
Enum value maps for Routing.
View Source
var (
// optional psrpc.Options options = 2198;
E_Options = &file_options_proto_extTypes[0]
)
Extension fields to descriptorpb.MethodOptions.
View Source
var File_options_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// This method is a pub/sub.
Subscription bool `protobuf:"varint,1,opt,name=subscription,proto3" json:"subscription,omitempty"`
// This method uses topics.
Topics bool `protobuf:"varint,2,opt,name=topics,proto3" json:"topics,omitempty"`
TopicParams *TopicParamOptions `protobuf:"bytes,3,opt,name=topic_params,json=topicParams,proto3" json:"topic_params,omitempty"`
// The method uses bidirectional streaming.
Stream bool `protobuf:"varint,4,opt,name=stream,proto3" json:"stream,omitempty"`
// RPC type
Type Routing `protobuf:"varint,8,opt,name=type,proto3,enum=psrpc.Routing" json:"type,omitempty"`
// deprecated
//
// Types that are valid to be assigned to Routing:
//
// *Options_Multi
// *Options_AffinityFunc
// *Options_Queue
Routing isOptions_Routing `protobuf_oneof:"routing"`
// contains filtered or unexported fields
}
func (*Options) Descriptor
deprecated
func (*Options) GetAffinityFunc ¶
func (*Options) GetRouting ¶ added in v0.3.1
func (x *Options) GetRouting() isOptions_Routing
func (*Options) GetSubscription ¶
func (*Options) GetTopicParams ¶ added in v0.2.8
func (x *Options) GetTopicParams() *TopicParamOptions
func (*Options) ProtoMessage ¶
func (*Options) ProtoMessage()
func (*Options) ProtoReflect ¶
func (x *Options) ProtoReflect() protoreflect.Message
type Options_AffinityFunc ¶ added in v0.3.1
type Options_AffinityFunc struct {
// Your service will supply an affinity function for handler selection.
AffinityFunc bool `protobuf:"varint,6,opt,name=affinity_func,json=affinityFunc,proto3,oneof"`
}
type Options_Multi ¶ added in v0.3.1
type Options_Multi struct {
// For RPCs, each client request will receive a response from every server.
// For subscriptions, every client will receive every update.
Multi bool `protobuf:"varint,5,opt,name=multi,proto3,oneof"`
}
type Options_Queue ¶ added in v0.3.1
type Options_Queue struct {
// Requests load balancing is provided by a pub/sub server queue
Queue bool `protobuf:"varint,7,opt,name=queue,proto3,oneof"`
}
type Routing ¶ added in v0.3.3
type Routing int32
RPC types
const ( Routing_QUEUE Routing = 0 // Servers will join a queue, and only one will receive each request Routing_AFFINITY Routing = 1 // Servers will implement an affinity function for handler selection Routing_MULTI Routing = 2 // Every server will respond to every request (for subscriptions, all clients will receive every message) )
func (Routing) Descriptor ¶ added in v0.3.3
func (Routing) Descriptor() protoreflect.EnumDescriptor
func (Routing) EnumDescriptor
deprecated
added in
v0.3.3
func (Routing) Number ¶ added in v0.3.3
func (x Routing) Number() protoreflect.EnumNumber
func (Routing) Type ¶ added in v0.3.3
func (Routing) Type() protoreflect.EnumType
type TopicParamOptions ¶ added in v0.2.8
type TopicParamOptions struct {
// The rpc can be registered/deregistered atomically with other group members
Group string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
// The topic is composed of one or more string-like parameters.
Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"`
// The topic parameters have associated string-like type parameters
Typed bool `protobuf:"varint,3,opt,name=typed,proto3" json:"typed,omitempty"`
// At most one server will be registered for each topic
SingleServer bool `protobuf:"varint,4,opt,name=single_server,json=singleServer,proto3" json:"single_server,omitempty"`
// contains filtered or unexported fields
}
func (*TopicParamOptions) Descriptor
deprecated
added in
v0.2.8
func (*TopicParamOptions) Descriptor() ([]byte, []int)
Deprecated: Use TopicParamOptions.ProtoReflect.Descriptor instead.
func (*TopicParamOptions) GetGroup ¶ added in v0.2.8
func (x *TopicParamOptions) GetGroup() string
func (*TopicParamOptions) GetNames ¶ added in v0.2.8
func (x *TopicParamOptions) GetNames() []string
func (*TopicParamOptions) GetSingleServer ¶ added in v0.2.9
func (x *TopicParamOptions) GetSingleServer() bool
func (*TopicParamOptions) GetTyped ¶ added in v0.2.8
func (x *TopicParamOptions) GetTyped() bool
func (*TopicParamOptions) ProtoMessage ¶ added in v0.2.8
func (*TopicParamOptions) ProtoMessage()
func (*TopicParamOptions) ProtoReflect ¶ added in v0.2.8
func (x *TopicParamOptions) ProtoReflect() protoreflect.Message
func (*TopicParamOptions) Reset ¶ added in v0.2.8
func (x *TopicParamOptions) Reset()
func (*TopicParamOptions) String ¶ added in v0.2.8
func (x *TopicParamOptions) String() string
Click to show internal directories.
Click to hide internal directories.