options

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2023 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

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 assignable 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) Descriptor() ([]byte, []int)

Deprecated: Use Options.ProtoReflect.Descriptor instead.

func (*Options) GetAffinityFunc

func (x *Options) GetAffinityFunc() bool

func (*Options) GetMulti

func (x *Options) GetMulti() bool

func (*Options) GetQueue added in v0.3.1

func (x *Options) GetQueue() bool

func (*Options) GetRouting added in v0.3.1

func (m *Options) GetRouting() isOptions_Routing

func (*Options) GetStream added in v0.2.5

func (x *Options) GetStream() bool

func (*Options) GetSubscription

func (x *Options) GetSubscription() bool

func (*Options) GetTopicParams added in v0.2.8

func (x *Options) GetTopicParams() *TopicParamOptions

func (*Options) GetTopics

func (x *Options) GetTopics() bool

func (*Options) GetType added in v0.3.3

func (x *Options) GetType() Routing

func (*Options) ProtoMessage

func (*Options) ProtoMessage()

func (*Options) ProtoReflect

func (x *Options) ProtoReflect() protoreflect.Message

func (*Options) Reset

func (x *Options) Reset()

func (*Options) String

func (x *Options) String() string

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) Enum added in v0.3.3

func (x Routing) Enum() *Routing

func (Routing) EnumDescriptor deprecated added in v0.3.3

func (Routing) EnumDescriptor() ([]byte, []int)

Deprecated: Use Routing.Descriptor instead.

func (Routing) Number added in v0.3.3

func (x Routing) Number() protoreflect.EnumNumber

func (Routing) String added in v0.3.3

func (x Routing) String() string

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL