Documentation ¶
Index ¶
- Variables
- type AffinityConfig
- func (*AffinityConfig) Descriptor() ([]byte, []int)deprecated
- func (x *AffinityConfig) GetAffinityKey() string
- func (x *AffinityConfig) GetCommand() AffinityConfig_Command
- func (*AffinityConfig) ProtoMessage()
- func (x *AffinityConfig) ProtoReflect() protoreflect.Message
- func (x *AffinityConfig) Reset()
- func (x *AffinityConfig) String() string
- type AffinityConfig_Command
- func (AffinityConfig_Command) Descriptor() protoreflect.EnumDescriptor
- func (x AffinityConfig_Command) Enum() *AffinityConfig_Command
- func (AffinityConfig_Command) EnumDescriptor() ([]byte, []int)deprecated
- func (x AffinityConfig_Command) Number() protoreflect.EnumNumber
- func (x AffinityConfig_Command) String() string
- func (AffinityConfig_Command) Type() protoreflect.EnumType
- type ApiConfig
- func (*ApiConfig) Descriptor() ([]byte, []int)deprecated
- func (x *ApiConfig) GetChannelPool() *ChannelPoolConfig
- func (x *ApiConfig) GetMethod() []*MethodConfig
- func (*ApiConfig) ProtoMessage()
- func (x *ApiConfig) ProtoReflect() protoreflect.Message
- func (x *ApiConfig) Reset()
- func (x *ApiConfig) String() string
- type ChannelPoolConfig
- func (*ChannelPoolConfig) Descriptor() ([]byte, []int)deprecated
- func (x *ChannelPoolConfig) GetBindPickStrategy() ChannelPoolConfig_BindPickStrategy
- func (x *ChannelPoolConfig) GetFallbackToReady() bool
- func (x *ChannelPoolConfig) GetIdleTimeout() uint64
- func (x *ChannelPoolConfig) GetMaxConcurrentStreamsLowWatermark() uint32
- func (x *ChannelPoolConfig) GetMaxSize() uint32
- func (x *ChannelPoolConfig) GetMinSize() uint32
- func (x *ChannelPoolConfig) GetUnresponsiveCalls() uint32
- func (x *ChannelPoolConfig) GetUnresponsiveDetectionMs() uint32
- func (*ChannelPoolConfig) ProtoMessage()
- func (x *ChannelPoolConfig) ProtoReflect() protoreflect.Message
- func (x *ChannelPoolConfig) Reset()
- func (x *ChannelPoolConfig) String() string
- type ChannelPoolConfig_BindPickStrategy
- func (ChannelPoolConfig_BindPickStrategy) Descriptor() protoreflect.EnumDescriptor
- func (x ChannelPoolConfig_BindPickStrategy) Enum() *ChannelPoolConfig_BindPickStrategy
- func (ChannelPoolConfig_BindPickStrategy) EnumDescriptor() ([]byte, []int)deprecated
- func (x ChannelPoolConfig_BindPickStrategy) Number() protoreflect.EnumNumber
- func (x ChannelPoolConfig_BindPickStrategy) String() string
- func (ChannelPoolConfig_BindPickStrategy) Type() protoreflect.EnumType
- type MethodConfig
- func (*MethodConfig) Descriptor() ([]byte, []int)deprecated
- func (x *MethodConfig) GetAffinity() *AffinityConfig
- func (x *MethodConfig) GetName() []string
- func (*MethodConfig) ProtoMessage()
- func (x *MethodConfig) ProtoReflect() protoreflect.Message
- func (x *MethodConfig) Reset()
- func (x *MethodConfig) String() string
Constants ¶
This section is empty.
Variables ¶
var ( ChannelPoolConfig_BindPickStrategy_name = map[int32]string{ 0: "UNSPECIFIED", 1: "LEAST_ACTIVE_STREAMS", 2: "ROUND_ROBIN", } ChannelPoolConfig_BindPickStrategy_value = map[string]int32{ "UNSPECIFIED": 0, "LEAST_ACTIVE_STREAMS": 1, "ROUND_ROBIN": 2, } )
Enum value maps for ChannelPoolConfig_BindPickStrategy.
var ( AffinityConfig_Command_name = map[int32]string{ 0: "BOUND", 1: "BIND", 2: "UNBIND", } AffinityConfig_Command_value = map[string]int32{ "BOUND": 0, "BIND": 1, "UNBIND": 2, } )
Enum value maps for AffinityConfig_Command.
var File_grpc_gcp_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type AffinityConfig ¶
type AffinityConfig struct { // The affinity command applies on the selected gRPC methods. Command AffinityConfig_Command `protobuf:"varint,2,opt,name=command,proto3,enum=grpc.gcp.AffinityConfig_Command" json:"command,omitempty"` // The field path of the affinity key in the request/response message. // For example: "f.a", "f.b.d", etc. AffinityKey string `protobuf:"bytes,3,opt,name=affinity_key,json=affinityKey,proto3" json:"affinity_key,omitempty"` // contains filtered or unexported fields }
func (*AffinityConfig) Descriptor
deprecated
func (*AffinityConfig) Descriptor() ([]byte, []int)
Deprecated: Use AffinityConfig.ProtoReflect.Descriptor instead.
func (*AffinityConfig) GetAffinityKey ¶
func (x *AffinityConfig) GetAffinityKey() string
func (*AffinityConfig) GetCommand ¶
func (x *AffinityConfig) GetCommand() AffinityConfig_Command
func (*AffinityConfig) ProtoMessage ¶
func (*AffinityConfig) ProtoMessage()
func (*AffinityConfig) ProtoReflect ¶
func (x *AffinityConfig) ProtoReflect() protoreflect.Message
func (*AffinityConfig) Reset ¶
func (x *AffinityConfig) Reset()
func (*AffinityConfig) String ¶
func (x *AffinityConfig) String() string
type AffinityConfig_Command ¶
type AffinityConfig_Command int32
const ( // The annotated method will be required to be bound to an existing session // to execute the RPC. The corresponding <affinity_key_field_path> will be // used to find the affinity key from the request message. AffinityConfig_BOUND AffinityConfig_Command = 0 // The annotated method will establish the channel affinity with the // channel which is used to execute the RPC. The corresponding // <affinity_key_field_path> will be used to find the affinity key from the // response message. AffinityConfig_BIND AffinityConfig_Command = 1 // The annotated method will remove the channel affinity with the // channel which is used to execute the RPC. The corresponding // <affinity_key_field_path> will be used to find the affinity key from the // request message. AffinityConfig_UNBIND AffinityConfig_Command = 2 )
func (AffinityConfig_Command) Descriptor ¶
func (AffinityConfig_Command) Descriptor() protoreflect.EnumDescriptor
func (AffinityConfig_Command) Enum ¶
func (x AffinityConfig_Command) Enum() *AffinityConfig_Command
func (AffinityConfig_Command) EnumDescriptor
deprecated
func (AffinityConfig_Command) EnumDescriptor() ([]byte, []int)
Deprecated: Use AffinityConfig_Command.Descriptor instead.
func (AffinityConfig_Command) Number ¶
func (x AffinityConfig_Command) Number() protoreflect.EnumNumber
func (AffinityConfig_Command) String ¶
func (x AffinityConfig_Command) String() string
func (AffinityConfig_Command) Type ¶
func (AffinityConfig_Command) Type() protoreflect.EnumType
type ApiConfig ¶
type ApiConfig struct { // The channel pool configurations. ChannelPool *ChannelPoolConfig `protobuf:"bytes,2,opt,name=channel_pool,json=channelPool,proto3" json:"channel_pool,omitempty"` // The method configurations. Method []*MethodConfig `protobuf:"bytes,1001,rep,name=method,proto3" json:"method,omitempty"` // contains filtered or unexported fields }
func (*ApiConfig) Descriptor
deprecated
func (*ApiConfig) GetChannelPool ¶
func (x *ApiConfig) GetChannelPool() *ChannelPoolConfig
func (*ApiConfig) GetMethod ¶
func (x *ApiConfig) GetMethod() []*MethodConfig
func (*ApiConfig) ProtoMessage ¶
func (*ApiConfig) ProtoMessage()
func (*ApiConfig) ProtoReflect ¶
func (x *ApiConfig) ProtoReflect() protoreflect.Message
type ChannelPoolConfig ¶
type ChannelPoolConfig struct { // The max number of channels in the pool. // Default value is 0, meaning 'unlimited' size. MaxSize uint32 `protobuf:"varint,1,opt,name=max_size,json=maxSize,proto3" json:"max_size,omitempty"` // The idle timeout (seconds) of channels without bound affinity sessions. IdleTimeout uint64 `protobuf:"varint,2,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` // The low watermark of max number of concurrent streams in a channel. // New channel will be created once it get hit, until we reach the max size of the channel pool. // Default value is 100. The valid range is [1, 100]. Any value outside the range will be ignored and the default value will be used. // Note: It is not recommended that users adjust this value, since a single channel should generally have no trouble managing the default (maximum) number of streams. MaxConcurrentStreamsLowWatermark uint32 `` /* 164-byte string literal not displayed */ // The minimum number of channels in the pool. MinSize uint32 `protobuf:"varint,4,opt,name=min_size,json=minSize,proto3" json:"min_size,omitempty"` // If a channel mapped to an affinity key is not ready, temporarily fallback // to another ready channel. // Enabling this fallback is beneficial in scenarios with short RPC timeouts // and rather slow connection establishing or during incidents when new // connections fail but existing connections still operate. FallbackToReady bool `protobuf:"varint,5,opt,name=fallback_to_ready,json=fallbackToReady,proto3" json:"fallback_to_ready,omitempty"` // Enables per channel unresponsive connection detection if > 0 and unresponsive_calls > 0. // If enabled and more than unresponsive_detection_ms passed since the last response from the server, // and >= unresponsive_calls RPC calls (started after last response from the server) timed-out on the client side, // then the connection of that channel will be gracefully refreshed. I.e., a new connection will be created for // that channel and after the new connection is ready it will replace the old connection. The calls on the old // connection will not be interrupted. The unresponsive_detection_ms will be doubled every consecutive refresh // if no response from the server is received. UnresponsiveDetectionMs uint32 `` /* 133-byte string literal not displayed */ // Enables per channel unresponsive connection detection if > 0 and unresponsive_detection_ms > 0. // If enabled and more than unresponsive_detection_ms passed since the last response from the server, // and >= unresponsive_calls RPC calls (started after last response from the server) timed-out on the client side, // then the connection of that channel will be gracefully refreshed. I.e., a new connection will be created for // that channel and after the new connection is ready it will replace the old connection. The calls on the old // connection will not be interrupted. The unresponsive_detection_ms will be doubled every consecutive refresh // if no response from the server is received. UnresponsiveCalls uint32 `protobuf:"varint,7,opt,name=unresponsive_calls,json=unresponsiveCalls,proto3" json:"unresponsive_calls,omitempty"` // The strategy for picking a channel for a call with BIND command. BindPickStrategy ChannelPoolConfig_BindPickStrategy `` /* 161-byte string literal not displayed */ // contains filtered or unexported fields }
ChannelPoolConfig are options for configuring the channel pool. RPCs will be scheduled onto existing channels in the pool until all channels have <max_concurrent_streams_low_watermark> number of streams. At this point a new channel is spun out. Once <max_size> channels have been spun out and each has <max_concurrent_streams_low_watermark> streams, subsequent RPCs will hang until any of the in-flight RPCs is finished, freeing up a channel.
func (*ChannelPoolConfig) Descriptor
deprecated
func (*ChannelPoolConfig) Descriptor() ([]byte, []int)
Deprecated: Use ChannelPoolConfig.ProtoReflect.Descriptor instead.
func (*ChannelPoolConfig) GetBindPickStrategy ¶
func (x *ChannelPoolConfig) GetBindPickStrategy() ChannelPoolConfig_BindPickStrategy
func (*ChannelPoolConfig) GetFallbackToReady ¶
func (x *ChannelPoolConfig) GetFallbackToReady() bool
func (*ChannelPoolConfig) GetIdleTimeout ¶
func (x *ChannelPoolConfig) GetIdleTimeout() uint64
func (*ChannelPoolConfig) GetMaxConcurrentStreamsLowWatermark ¶
func (x *ChannelPoolConfig) GetMaxConcurrentStreamsLowWatermark() uint32
func (*ChannelPoolConfig) GetMaxSize ¶
func (x *ChannelPoolConfig) GetMaxSize() uint32
func (*ChannelPoolConfig) GetMinSize ¶
func (x *ChannelPoolConfig) GetMinSize() uint32
func (*ChannelPoolConfig) GetUnresponsiveCalls ¶
func (x *ChannelPoolConfig) GetUnresponsiveCalls() uint32
func (*ChannelPoolConfig) GetUnresponsiveDetectionMs ¶
func (x *ChannelPoolConfig) GetUnresponsiveDetectionMs() uint32
func (*ChannelPoolConfig) ProtoMessage ¶
func (*ChannelPoolConfig) ProtoMessage()
func (*ChannelPoolConfig) ProtoReflect ¶
func (x *ChannelPoolConfig) ProtoReflect() protoreflect.Message
func (*ChannelPoolConfig) Reset ¶
func (x *ChannelPoolConfig) Reset()
func (*ChannelPoolConfig) String ¶
func (x *ChannelPoolConfig) String() string
type ChannelPoolConfig_BindPickStrategy ¶
type ChannelPoolConfig_BindPickStrategy int32
A selection of strategies for picking a channel for a call with BIND command.
const ( // No preference -- picking a channel for a BIND call will be no different // than for any other calls. ChannelPoolConfig_UNSPECIFIED ChannelPoolConfig_BindPickStrategy = 0 // A channel with the least active streams at the moment of a BIND call // initiation will be picked. ChannelPoolConfig_LEAST_ACTIVE_STREAMS ChannelPoolConfig_BindPickStrategy = 1 // Cycle through channels created by the BIND call initiation. I. e. pick // a channel in a round-robin manner. Note that some channels may be // skipped during channel pool resize. ChannelPoolConfig_ROUND_ROBIN ChannelPoolConfig_BindPickStrategy = 2 )
func (ChannelPoolConfig_BindPickStrategy) Descriptor ¶
func (ChannelPoolConfig_BindPickStrategy) Descriptor() protoreflect.EnumDescriptor
func (ChannelPoolConfig_BindPickStrategy) Enum ¶
func (x ChannelPoolConfig_BindPickStrategy) Enum() *ChannelPoolConfig_BindPickStrategy
func (ChannelPoolConfig_BindPickStrategy) EnumDescriptor
deprecated
func (ChannelPoolConfig_BindPickStrategy) EnumDescriptor() ([]byte, []int)
Deprecated: Use ChannelPoolConfig_BindPickStrategy.Descriptor instead.
func (ChannelPoolConfig_BindPickStrategy) Number ¶
func (x ChannelPoolConfig_BindPickStrategy) Number() protoreflect.EnumNumber
func (ChannelPoolConfig_BindPickStrategy) String ¶
func (x ChannelPoolConfig_BindPickStrategy) String() string
func (ChannelPoolConfig_BindPickStrategy) Type ¶
func (ChannelPoolConfig_BindPickStrategy) Type() protoreflect.EnumType
type MethodConfig ¶
type MethodConfig struct { // A fully qualified name of a gRPC method, or a wildcard pattern ending // with .*, such as foo.bar.A, foo.bar.*. Method configs are evaluated // sequentially, and the first one takes precedence. Name []string `protobuf:"bytes,1,rep,name=name,proto3" json:"name,omitempty"` // The channel affinity configurations. Affinity *AffinityConfig `protobuf:"bytes,1001,opt,name=affinity,proto3" json:"affinity,omitempty"` // contains filtered or unexported fields }
func (*MethodConfig) Descriptor
deprecated
func (*MethodConfig) Descriptor() ([]byte, []int)
Deprecated: Use MethodConfig.ProtoReflect.Descriptor instead.
func (*MethodConfig) GetAffinity ¶
func (x *MethodConfig) GetAffinity() *AffinityConfig
func (*MethodConfig) GetName ¶
func (x *MethodConfig) GetName() []string
func (*MethodConfig) ProtoMessage ¶
func (*MethodConfig) ProtoMessage()
func (*MethodConfig) ProtoReflect ¶
func (x *MethodConfig) ProtoReflect() protoreflect.Message
func (*MethodConfig) Reset ¶
func (x *MethodConfig) Reset()
func (*MethodConfig) String ¶
func (x *MethodConfig) String() string