Documentation
¶
Overview ¶
Package allocation is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterAllocationServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAllocationServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AllocationServiceClient) error
- func RegisterAllocationServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAllocationServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AllocationServiceServer) error
- func RegisterAllocationServiceServer(s grpc.ServiceRegistrar, srv AllocationServiceServer)
- func RegisterProcessorServer(s grpc.ServiceRegistrar, srv ProcessorServer)
- type AllocationRequest
- func (*AllocationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AllocationRequest) GetCounters() map[string]*CounterAction
- func (x *AllocationRequest) GetGameServerSelectors() []*GameServerSelector
- func (x *AllocationRequest) GetLists() map[string]*ListAction
- func (x *AllocationRequest) GetMetaPatch() *MetaPatch
- func (x *AllocationRequest) GetMetadata() *MetaPatch
- func (x *AllocationRequest) GetMultiClusterSetting() *MultiClusterSetting
- func (x *AllocationRequest) GetNamespace() string
- func (x *AllocationRequest) GetPreferredGameServerSelectors() []*GameServerSelectordeprecated
- func (x *AllocationRequest) GetPriorities() []*Priority
- func (x *AllocationRequest) GetRequiredGameServerSelector() *GameServerSelectordeprecated
- func (x *AllocationRequest) GetScheduling() AllocationRequest_SchedulingStrategy
- func (*AllocationRequest) ProtoMessage()
- func (x *AllocationRequest) ProtoReflect() protoreflect.Message
- func (x *AllocationRequest) Reset()
- func (x *AllocationRequest) String() string
- type AllocationRequest_SchedulingStrategy
- func (AllocationRequest_SchedulingStrategy) Descriptor() protoreflect.EnumDescriptor
- func (x AllocationRequest_SchedulingStrategy) Enum() *AllocationRequest_SchedulingStrategy
- func (AllocationRequest_SchedulingStrategy) EnumDescriptor() ([]byte, []int)deprecated
- func (x AllocationRequest_SchedulingStrategy) Number() protoreflect.EnumNumber
- func (x AllocationRequest_SchedulingStrategy) String() string
- func (AllocationRequest_SchedulingStrategy) Type() protoreflect.EnumType
- type AllocationResponse
- func (*AllocationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AllocationResponse) GetAddress() string
- func (x *AllocationResponse) GetAddresses() []*AllocationResponse_GameServerStatusAddress
- func (x *AllocationResponse) GetCounters() map[string]*AllocationResponse_CounterStatus
- func (x *AllocationResponse) GetGameServerName() string
- func (x *AllocationResponse) GetLists() map[string]*AllocationResponse_ListStatus
- func (x *AllocationResponse) GetMetadata() *AllocationResponse_GameServerMetadata
- func (x *AllocationResponse) GetNodeName() string
- func (x *AllocationResponse) GetPorts() []*AllocationResponse_GameServerStatusPort
- func (x *AllocationResponse) GetSource() string
- func (*AllocationResponse) ProtoMessage()
- func (x *AllocationResponse) ProtoReflect() protoreflect.Message
- func (x *AllocationResponse) Reset()
- func (x *AllocationResponse) String() string
- type AllocationResponse_CounterStatus
- func (*AllocationResponse_CounterStatus) Descriptor() ([]byte, []int)deprecated
- func (x *AllocationResponse_CounterStatus) GetCapacity() *wrapperspb.Int64Value
- func (x *AllocationResponse_CounterStatus) GetCount() *wrapperspb.Int64Value
- func (*AllocationResponse_CounterStatus) ProtoMessage()
- func (x *AllocationResponse_CounterStatus) ProtoReflect() protoreflect.Message
- func (x *AllocationResponse_CounterStatus) Reset()
- func (x *AllocationResponse_CounterStatus) String() string
- type AllocationResponse_GameServerMetadata
- func (*AllocationResponse_GameServerMetadata) Descriptor() ([]byte, []int)deprecated
- func (x *AllocationResponse_GameServerMetadata) GetAnnotations() map[string]string
- func (x *AllocationResponse_GameServerMetadata) GetLabels() map[string]string
- func (*AllocationResponse_GameServerMetadata) ProtoMessage()
- func (x *AllocationResponse_GameServerMetadata) ProtoReflect() protoreflect.Message
- func (x *AllocationResponse_GameServerMetadata) Reset()
- func (x *AllocationResponse_GameServerMetadata) String() string
- type AllocationResponse_GameServerStatusAddress
- func (*AllocationResponse_GameServerStatusAddress) Descriptor() ([]byte, []int)deprecated
- func (x *AllocationResponse_GameServerStatusAddress) GetAddress() string
- func (x *AllocationResponse_GameServerStatusAddress) GetType() string
- func (*AllocationResponse_GameServerStatusAddress) ProtoMessage()
- func (x *AllocationResponse_GameServerStatusAddress) ProtoReflect() protoreflect.Message
- func (x *AllocationResponse_GameServerStatusAddress) Reset()
- func (x *AllocationResponse_GameServerStatusAddress) String() string
- type AllocationResponse_GameServerStatusPort
- func (*AllocationResponse_GameServerStatusPort) Descriptor() ([]byte, []int)deprecated
- func (x *AllocationResponse_GameServerStatusPort) GetName() string
- func (x *AllocationResponse_GameServerStatusPort) GetPort() int32
- func (*AllocationResponse_GameServerStatusPort) ProtoMessage()
- func (x *AllocationResponse_GameServerStatusPort) ProtoReflect() protoreflect.Message
- func (x *AllocationResponse_GameServerStatusPort) Reset()
- func (x *AllocationResponse_GameServerStatusPort) String() string
- type AllocationResponse_ListStatus
- func (*AllocationResponse_ListStatus) Descriptor() ([]byte, []int)deprecated
- func (x *AllocationResponse_ListStatus) GetCapacity() *wrapperspb.Int64Value
- func (x *AllocationResponse_ListStatus) GetValues() []string
- func (*AllocationResponse_ListStatus) ProtoMessage()
- func (x *AllocationResponse_ListStatus) ProtoReflect() protoreflect.Message
- func (x *AllocationResponse_ListStatus) Reset()
- func (x *AllocationResponse_ListStatus) String() string
- type AllocationServiceClient
- type AllocationServiceServer
- type BatchRequest
- func (*BatchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BatchRequest) GetBatchId() string
- func (x *BatchRequest) GetRequests() []*RequestWrapper
- func (*BatchRequest) ProtoMessage()
- func (x *BatchRequest) ProtoReflect() protoreflect.Message
- func (x *BatchRequest) Reset()
- func (x *BatchRequest) String() string
- type BatchResponse
- func (*BatchResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BatchResponse) GetBatchId() string
- func (x *BatchResponse) GetResponses() []*ResponseWrapper
- func (*BatchResponse) ProtoMessage()
- func (x *BatchResponse) ProtoReflect() protoreflect.Message
- func (x *BatchResponse) Reset()
- func (x *BatchResponse) String() string
- type CounterAction
- func (*CounterAction) Descriptor() ([]byte, []int)deprecated
- func (x *CounterAction) GetAction() *wrapperspb.StringValue
- func (x *CounterAction) GetAmount() *wrapperspb.Int64Value
- func (x *CounterAction) GetCapacity() *wrapperspb.Int64Value
- func (*CounterAction) ProtoMessage()
- func (x *CounterAction) ProtoReflect() protoreflect.Message
- func (x *CounterAction) Reset()
- func (x *CounterAction) String() string
- type CounterSelector
- func (*CounterSelector) Descriptor() ([]byte, []int)deprecated
- func (x *CounterSelector) GetMaxAvailable() int64
- func (x *CounterSelector) GetMaxCount() int64
- func (x *CounterSelector) GetMinAvailable() int64
- func (x *CounterSelector) GetMinCount() int64
- func (*CounterSelector) ProtoMessage()
- func (x *CounterSelector) ProtoReflect() protoreflect.Message
- func (x *CounterSelector) Reset()
- func (x *CounterSelector) String() string
- type GameServerSelector
- func (*GameServerSelector) Descriptor() ([]byte, []int)deprecated
- func (x *GameServerSelector) GetCounters() map[string]*CounterSelector
- func (x *GameServerSelector) GetGameServerState() GameServerSelector_GameServerState
- func (x *GameServerSelector) GetLists() map[string]*ListSelector
- func (x *GameServerSelector) GetMatchExpressions() []*LabelMatchExpressions
- func (x *GameServerSelector) GetMatchLabels() map[string]string
- func (*GameServerSelector) ProtoMessage()
- func (x *GameServerSelector) ProtoReflect() protoreflect.Message
- func (x *GameServerSelector) Reset()
- func (x *GameServerSelector) String() string
- type GameServerSelector_GameServerState
- func (GameServerSelector_GameServerState) Descriptor() protoreflect.EnumDescriptor
- func (x GameServerSelector_GameServerState) Enum() *GameServerSelector_GameServerState
- func (GameServerSelector_GameServerState) EnumDescriptor() ([]byte, []int)deprecated
- func (x GameServerSelector_GameServerState) Number() protoreflect.EnumNumber
- func (x GameServerSelector_GameServerState) String() string
- func (GameServerSelector_GameServerState) Type() protoreflect.EnumType
- type LabelMatchExpressions
- func (*LabelMatchExpressions) Descriptor() ([]byte, []int)deprecated
- func (x *LabelMatchExpressions) GetKey() string
- func (x *LabelMatchExpressions) GetOperator() LabelMatchExpressions_Operator
- func (x *LabelMatchExpressions) GetValues() []string
- func (*LabelMatchExpressions) ProtoMessage()
- func (x *LabelMatchExpressions) ProtoReflect() protoreflect.Message
- func (x *LabelMatchExpressions) Reset()
- func (x *LabelMatchExpressions) String() string
- type LabelMatchExpressions_Operator
- func (LabelMatchExpressions_Operator) Descriptor() protoreflect.EnumDescriptor
- func (x LabelMatchExpressions_Operator) Enum() *LabelMatchExpressions_Operator
- func (LabelMatchExpressions_Operator) EnumDescriptor() ([]byte, []int)deprecated
- func (x LabelMatchExpressions_Operator) Number() protoreflect.EnumNumber
- func (x LabelMatchExpressions_Operator) String() string
- func (LabelMatchExpressions_Operator) Type() protoreflect.EnumType
- type LabelSelector
- type ListAction
- func (*ListAction) Descriptor() ([]byte, []int)deprecated
- func (x *ListAction) GetAddValues() []string
- func (x *ListAction) GetCapacity() *wrapperspb.Int64Value
- func (x *ListAction) GetDeleteValues() []string
- func (*ListAction) ProtoMessage()
- func (x *ListAction) ProtoReflect() protoreflect.Message
- func (x *ListAction) Reset()
- func (x *ListAction) String() string
- type ListSelector
- func (*ListSelector) Descriptor() ([]byte, []int)deprecated
- func (x *ListSelector) GetContainsValue() string
- func (x *ListSelector) GetMaxAvailable() int64
- func (x *ListSelector) GetMinAvailable() int64
- func (*ListSelector) ProtoMessage()
- func (x *ListSelector) ProtoReflect() protoreflect.Message
- func (x *ListSelector) Reset()
- func (x *ListSelector) String() string
- type MetaPatch
- func (*MetaPatch) Descriptor() ([]byte, []int)deprecated
- func (x *MetaPatch) GetAnnotations() map[string]string
- func (x *MetaPatch) GetLabels() map[string]string
- func (*MetaPatch) ProtoMessage()
- func (x *MetaPatch) ProtoReflect() protoreflect.Message
- func (x *MetaPatch) Reset()
- func (x *MetaPatch) String() string
- type MultiClusterSetting
- func (*MultiClusterSetting) Descriptor() ([]byte, []int)deprecated
- func (x *MultiClusterSetting) GetEnabled() bool
- func (x *MultiClusterSetting) GetPolicySelector() *LabelSelector
- func (*MultiClusterSetting) ProtoMessage()
- func (x *MultiClusterSetting) ProtoReflect() protoreflect.Message
- func (x *MultiClusterSetting) Reset()
- func (x *MultiClusterSetting) String() string
- type Priority
- func (*Priority) Descriptor() ([]byte, []int)deprecated
- func (x *Priority) GetKey() string
- func (x *Priority) GetOrder() Priority_Order
- func (x *Priority) GetType() Priority_Type
- func (*Priority) ProtoMessage()
- func (x *Priority) ProtoReflect() protoreflect.Message
- func (x *Priority) Reset()
- func (x *Priority) String() string
- type Priority_Order
- func (Priority_Order) Descriptor() protoreflect.EnumDescriptor
- func (x Priority_Order) Enum() *Priority_Order
- func (Priority_Order) EnumDescriptor() ([]byte, []int)deprecated
- func (x Priority_Order) Number() protoreflect.EnumNumber
- func (x Priority_Order) String() string
- func (Priority_Order) Type() protoreflect.EnumType
- type Priority_Type
- func (Priority_Type) Descriptor() protoreflect.EnumDescriptor
- func (x Priority_Type) Enum() *Priority_Type
- func (Priority_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x Priority_Type) Number() protoreflect.EnumNumber
- func (x Priority_Type) String() string
- func (Priority_Type) Type() protoreflect.EnumType
- type ProcessorClient
- type ProcessorMessage
- func (*ProcessorMessage) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessorMessage) GetBatchRequest() *BatchRequest
- func (x *ProcessorMessage) GetBatchResponse() *BatchResponse
- func (x *ProcessorMessage) GetClientId() string
- func (m *ProcessorMessage) GetPayload() isProcessorMessage_Payload
- func (x *ProcessorMessage) GetPull() *PullRequest
- func (*ProcessorMessage) ProtoMessage()
- func (x *ProcessorMessage) ProtoReflect() protoreflect.Message
- func (x *ProcessorMessage) Reset()
- func (x *ProcessorMessage) String() string
- type ProcessorMessage_BatchRequest
- type ProcessorMessage_BatchResponse
- type ProcessorMessage_Pull
- type ProcessorServer
- type Processor_StreamBatchesClient
- type Processor_StreamBatchesServer
- type PullRequest
- type RequestWrapper
- func (*RequestWrapper) Descriptor() ([]byte, []int)deprecated
- func (x *RequestWrapper) GetRequest() *AllocationRequest
- func (x *RequestWrapper) GetRequestId() string
- func (*RequestWrapper) ProtoMessage()
- func (x *RequestWrapper) ProtoReflect() protoreflect.Message
- func (x *RequestWrapper) Reset()
- func (x *RequestWrapper) String() string
- type ResponseWrapper
- func (*ResponseWrapper) Descriptor() ([]byte, []int)deprecated
- func (x *ResponseWrapper) GetError() *status.Status
- func (x *ResponseWrapper) GetRequestId() string
- func (x *ResponseWrapper) GetResponse() *AllocationResponse
- func (m *ResponseWrapper) GetResult() isResponseWrapper_Result
- func (*ResponseWrapper) ProtoMessage()
- func (x *ResponseWrapper) ProtoReflect() protoreflect.Message
- func (x *ResponseWrapper) Reset()
- func (x *ResponseWrapper) String() string
- type ResponseWrapper_Error
- type ResponseWrapper_Response
- type UnimplementedAllocationServiceServer
- type UnimplementedProcessorServer
- type UnsafeAllocationServiceServer
- type UnsafeProcessorServer
Constants ¶
This section is empty.
Variables ¶
var ( AllocationRequest_SchedulingStrategy_name = map[int32]string{ 0: "Packed", 1: "Distributed", } AllocationRequest_SchedulingStrategy_value = map[string]int32{ "Packed": 0, "Distributed": 1, } )
Enum value maps for AllocationRequest_SchedulingStrategy.
var ( LabelMatchExpressions_Operator_name = map[int32]string{ 0: "In", 1: "NotIn", 2: "Exists", 3: "DoesNotExist", } LabelMatchExpressions_Operator_value = map[string]int32{ "In": 0, "NotIn": 1, "Exists": 2, "DoesNotExist": 3, } )
Enum value maps for LabelMatchExpressions_Operator.
var ( GameServerSelector_GameServerState_name = map[int32]string{ 0: "READY", 1: "ALLOCATED", } GameServerSelector_GameServerState_value = map[string]int32{ "READY": 0, "ALLOCATED": 1, } )
Enum value maps for GameServerSelector_GameServerState.
var ( Priority_Type_name = map[int32]string{ 0: "Counter", 1: "List", } Priority_Type_value = map[string]int32{ "Counter": 0, "List": 1, } )
Enum value maps for Priority_Type.
var ( Priority_Order_name = map[int32]string{ 0: "Ascending", 1: "Descending", } Priority_Order_value = map[string]int32{ "Ascending": 0, "Descending": 1, } )
Enum value maps for Priority_Order.
var AllocationService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "allocation.AllocationService", HandlerType: (*AllocationServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Allocate", Handler: _AllocationService_Allocate_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/allocation/allocation.proto", }
AllocationService_ServiceDesc is the grpc.ServiceDesc for AllocationService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_allocation_allocation_proto protoreflect.FileDescriptor
var File_proto_allocation_processor_proto protoreflect.FileDescriptor
var Processor_ServiceDesc = grpc.ServiceDesc{ ServiceName: "allocation.Processor", HandlerType: (*ProcessorServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "StreamBatches", Handler: _Processor_StreamBatches_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "proto/allocation/processor.proto", }
Processor_ServiceDesc is the grpc.ServiceDesc for Processor service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterAllocationServiceHandler ¶
func RegisterAllocationServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterAllocationServiceHandler registers the http handlers for service AllocationService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAllocationServiceHandlerClient ¶
func RegisterAllocationServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AllocationServiceClient) error
RegisterAllocationServiceHandlerClient registers the http handlers for service AllocationService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AllocationServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AllocationServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AllocationServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterAllocationServiceHandlerFromEndpoint ¶
func RegisterAllocationServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAllocationServiceHandlerFromEndpoint is same as RegisterAllocationServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAllocationServiceHandlerServer ¶
func RegisterAllocationServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AllocationServiceServer) error
RegisterAllocationServiceHandlerServer registers the http handlers for service AllocationService to "mux". UnaryRPC :call AllocationServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAllocationServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterAllocationServiceServer ¶
func RegisterAllocationServiceServer(s grpc.ServiceRegistrar, srv AllocationServiceServer)
func RegisterProcessorServer ¶ added in v1.52.0
func RegisterProcessorServer(s grpc.ServiceRegistrar, srv ProcessorServer)
Types ¶
type AllocationRequest ¶
type AllocationRequest struct {
// The k8s namespace that is hosting the targeted fleet of gameservers to be allocated
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
// If specified, multi-cluster policies are applied. Otherwise, allocation will happen locally.
MultiClusterSetting *MultiClusterSetting `protobuf:"bytes,2,opt,name=multiClusterSetting,proto3" json:"multiClusterSetting,omitempty"`
// Deprecated: Please use gameServerSelectors instead. This field is ignored if the
// gameServerSelectors field is set
// The required allocation. Defaults to all GameServers.
//
// Deprecated: Do not use.
RequiredGameServerSelector *GameServerSelector `protobuf:"bytes,3,opt,name=requiredGameServerSelector,proto3" json:"requiredGameServerSelector,omitempty"`
// Deprecated: Please use gameServerSelectors instead. This field is ignored if the
// gameServerSelectors field is set
// The ordered list of preferred allocations out of the `required` set.
// If the first selector is not matched, the selection attempts the second selector, and so on.
//
// Deprecated: Do not use.
PreferredGameServerSelectors []*GameServerSelector `protobuf:"bytes,4,rep,name=preferredGameServerSelectors,proto3" json:"preferredGameServerSelectors,omitempty"`
// Scheduling strategy. Defaults to "Packed".
Scheduling AllocationRequest_SchedulingStrategy `` /* 127-byte string literal not displayed */
// Deprecated: Please use metadata instead. This field is ignored if the
// metadata field is set
MetaPatch *MetaPatch `protobuf:"bytes,6,opt,name=metaPatch,proto3" json:"metaPatch,omitempty"`
// Metadata is optional custom metadata that is added to the game server at
// allocation. You can use this to tell the server necessary session data
Metadata *MetaPatch `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata,omitempty"`
// Ordered list of GameServer label selectors.
// If the first selector is not matched, the selection attempts the second selector, and so on.
// This is useful for things like smoke testing of new game servers.
// Note: This field can only be set if neither Required or Preferred is set.
GameServerSelectors []*GameServerSelector `protobuf:"bytes,8,rep,name=gameServerSelectors,proto3" json:"gameServerSelectors,omitempty"`
// [Stage: Beta]
// [FeatureFlag:CountsAndLists]
// `Priorities` configuration alters the order in which `GameServers` are searched for matches to the configured `selectors`.
//
// Priority of sorting is in descending importance. I.e. The position 0 `priority` entry is checked first.
//
// For `Packed` strategy sorting, this priority list will be the tie-breaker within the least utilised infrastructure, to ensure optimal
// infrastructure usage while also allowing some custom prioritisation of `GameServers`.
//
// For `Distributed` strategy sorting, the entire selection of `GameServers` will be sorted by this priority list to provide the
// order that `GameServers` will be allocated by.
Priorities []*Priority `protobuf:"bytes,9,rep,name=priorities,proto3" json:"priorities,omitempty"`
// [Stage: Beta]
// [FeatureFlag:CountsAndLists]
// Counters and Lists provide a set of actions to perform
// on Counters and Lists during allocation.
Counters map[string]*CounterAction `` /* 158-byte string literal not displayed */
Lists map[string]*ListAction `` /* 152-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*AllocationRequest) Descriptor
deprecated
func (*AllocationRequest) Descriptor() ([]byte, []int)
Deprecated: Use AllocationRequest.ProtoReflect.Descriptor instead.
func (*AllocationRequest) GetCounters ¶ added in v1.36.0
func (x *AllocationRequest) GetCounters() map[string]*CounterAction
func (*AllocationRequest) GetGameServerSelectors ¶ added in v1.17.0
func (x *AllocationRequest) GetGameServerSelectors() []*GameServerSelector
func (*AllocationRequest) GetLists ¶ added in v1.36.0
func (x *AllocationRequest) GetLists() map[string]*ListAction
func (*AllocationRequest) GetMetaPatch ¶
func (x *AllocationRequest) GetMetaPatch() *MetaPatch
func (*AllocationRequest) GetMetadata ¶ added in v1.15.0
func (x *AllocationRequest) GetMetadata() *MetaPatch
func (*AllocationRequest) GetMultiClusterSetting ¶
func (x *AllocationRequest) GetMultiClusterSetting() *MultiClusterSetting
func (*AllocationRequest) GetNamespace ¶
func (x *AllocationRequest) GetNamespace() string
func (*AllocationRequest) GetPreferredGameServerSelectors
deprecated
func (x *AllocationRequest) GetPreferredGameServerSelectors() []*GameServerSelector
Deprecated: Do not use.
func (*AllocationRequest) GetPriorities ¶ added in v1.32.0
func (x *AllocationRequest) GetPriorities() []*Priority
func (*AllocationRequest) GetRequiredGameServerSelector
deprecated
func (x *AllocationRequest) GetRequiredGameServerSelector() *GameServerSelector
Deprecated: Do not use.
func (*AllocationRequest) GetScheduling ¶
func (x *AllocationRequest) GetScheduling() AllocationRequest_SchedulingStrategy
func (*AllocationRequest) ProtoMessage ¶
func (*AllocationRequest) ProtoMessage()
func (*AllocationRequest) ProtoReflect ¶ added in v1.29.0
func (x *AllocationRequest) ProtoReflect() protoreflect.Message
func (*AllocationRequest) Reset ¶
func (x *AllocationRequest) Reset()
func (*AllocationRequest) String ¶
func (x *AllocationRequest) String() string
type AllocationRequest_SchedulingStrategy ¶
type AllocationRequest_SchedulingStrategy int32
const ( AllocationRequest_Packed AllocationRequest_SchedulingStrategy = 0 AllocationRequest_Distributed AllocationRequest_SchedulingStrategy = 1 )
func (AllocationRequest_SchedulingStrategy) Descriptor ¶ added in v1.29.0
func (AllocationRequest_SchedulingStrategy) Descriptor() protoreflect.EnumDescriptor
func (AllocationRequest_SchedulingStrategy) Enum ¶ added in v1.29.0
func (x AllocationRequest_SchedulingStrategy) Enum() *AllocationRequest_SchedulingStrategy
func (AllocationRequest_SchedulingStrategy) EnumDescriptor
deprecated
func (AllocationRequest_SchedulingStrategy) EnumDescriptor() ([]byte, []int)
Deprecated: Use AllocationRequest_SchedulingStrategy.Descriptor instead.
func (AllocationRequest_SchedulingStrategy) Number ¶ added in v1.29.0
func (x AllocationRequest_SchedulingStrategy) Number() protoreflect.EnumNumber
func (AllocationRequest_SchedulingStrategy) String ¶
func (x AllocationRequest_SchedulingStrategy) String() string
func (AllocationRequest_SchedulingStrategy) Type ¶ added in v1.29.0
func (AllocationRequest_SchedulingStrategy) Type() protoreflect.EnumType
type AllocationResponse ¶
type AllocationResponse struct {
GameServerName string `protobuf:"bytes,2,opt,name=gameServerName,proto3" json:"gameServerName,omitempty"`
Ports []*AllocationResponse_GameServerStatusPort `protobuf:"bytes,3,rep,name=ports,proto3" json:"ports,omitempty"`
// Primary address at which game server can be reached
Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"`
// All addresses at which game server can be reached; copy of Node.Status.addresses
Addresses []*AllocationResponse_GameServerStatusAddress `protobuf:"bytes,8,rep,name=addresses,proto3" json:"addresses,omitempty"`
NodeName string `protobuf:"bytes,5,opt,name=nodeName,proto3" json:"nodeName,omitempty"`
Source string `protobuf:"bytes,6,opt,name=source,proto3" json:"source,omitempty"`
Metadata *AllocationResponse_GameServerMetadata `protobuf:"bytes,7,opt,name=metadata,proto3,oneof" json:"metadata,omitempty"`
// (Beta, CountsAndLists feature flag) Status of Counters and Lists on allocation.
Counters map[string]*AllocationResponse_CounterStatus `` /* 157-byte string literal not displayed */
Lists map[string]*AllocationResponse_ListStatus `` /* 152-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*AllocationResponse) Descriptor
deprecated
func (*AllocationResponse) Descriptor() ([]byte, []int)
Deprecated: Use AllocationResponse.ProtoReflect.Descriptor instead.
func (*AllocationResponse) GetAddress ¶
func (x *AllocationResponse) GetAddress() string
func (*AllocationResponse) GetAddresses ¶ added in v1.34.0
func (x *AllocationResponse) GetAddresses() []*AllocationResponse_GameServerStatusAddress
func (*AllocationResponse) GetCounters ¶ added in v1.39.0
func (x *AllocationResponse) GetCounters() map[string]*AllocationResponse_CounterStatus
func (*AllocationResponse) GetGameServerName ¶
func (x *AllocationResponse) GetGameServerName() string
func (*AllocationResponse) GetLists ¶ added in v1.39.0
func (x *AllocationResponse) GetLists() map[string]*AllocationResponse_ListStatus
func (*AllocationResponse) GetMetadata ¶ added in v1.33.0
func (x *AllocationResponse) GetMetadata() *AllocationResponse_GameServerMetadata
func (*AllocationResponse) GetNodeName ¶
func (x *AllocationResponse) GetNodeName() string
func (*AllocationResponse) GetPorts ¶
func (x *AllocationResponse) GetPorts() []*AllocationResponse_GameServerStatusPort
func (*AllocationResponse) GetSource ¶ added in v1.29.0
func (x *AllocationResponse) GetSource() string
func (*AllocationResponse) ProtoMessage ¶
func (*AllocationResponse) ProtoMessage()
func (*AllocationResponse) ProtoReflect ¶ added in v1.29.0
func (x *AllocationResponse) ProtoReflect() protoreflect.Message
func (*AllocationResponse) Reset ¶
func (x *AllocationResponse) Reset()
func (*AllocationResponse) String ¶
func (x *AllocationResponse) String() string
type AllocationResponse_CounterStatus ¶ added in v1.39.0
type AllocationResponse_CounterStatus struct {
Count *wrapperspb.Int64Value `protobuf:"bytes,1,opt,name=count,proto3" json:"count,omitempty"`
Capacity *wrapperspb.Int64Value `protobuf:"bytes,2,opt,name=capacity,proto3" json:"capacity,omitempty"`
// contains filtered or unexported fields
}
func (*AllocationResponse_CounterStatus) Descriptor
deprecated
added in
v1.39.0
func (*AllocationResponse_CounterStatus) Descriptor() ([]byte, []int)
Deprecated: Use AllocationResponse_CounterStatus.ProtoReflect.Descriptor instead.
func (*AllocationResponse_CounterStatus) GetCapacity ¶ added in v1.39.0
func (x *AllocationResponse_CounterStatus) GetCapacity() *wrapperspb.Int64Value
func (*AllocationResponse_CounterStatus) GetCount ¶ added in v1.39.0
func (x *AllocationResponse_CounterStatus) GetCount() *wrapperspb.Int64Value
func (*AllocationResponse_CounterStatus) ProtoMessage ¶ added in v1.39.0
func (*AllocationResponse_CounterStatus) ProtoMessage()
func (*AllocationResponse_CounterStatus) ProtoReflect ¶ added in v1.39.0
func (x *AllocationResponse_CounterStatus) ProtoReflect() protoreflect.Message
func (*AllocationResponse_CounterStatus) Reset ¶ added in v1.39.0
func (x *AllocationResponse_CounterStatus) Reset()
func (*AllocationResponse_CounterStatus) String ¶ added in v1.39.0
func (x *AllocationResponse_CounterStatus) String() string
type AllocationResponse_GameServerMetadata ¶ added in v1.33.0
type AllocationResponse_GameServerMetadata struct {
Labels map[string]string `` /* 153-byte string literal not displayed */
Annotations map[string]string `` /* 163-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*AllocationResponse_GameServerMetadata) Descriptor
deprecated
added in
v1.33.0
func (*AllocationResponse_GameServerMetadata) Descriptor() ([]byte, []int)
Deprecated: Use AllocationResponse_GameServerMetadata.ProtoReflect.Descriptor instead.
func (*AllocationResponse_GameServerMetadata) GetAnnotations ¶ added in v1.33.0
func (x *AllocationResponse_GameServerMetadata) GetAnnotations() map[string]string
func (*AllocationResponse_GameServerMetadata) GetLabels ¶ added in v1.33.0
func (x *AllocationResponse_GameServerMetadata) GetLabels() map[string]string
func (*AllocationResponse_GameServerMetadata) ProtoMessage ¶ added in v1.33.0
func (*AllocationResponse_GameServerMetadata) ProtoMessage()
func (*AllocationResponse_GameServerMetadata) ProtoReflect ¶ added in v1.33.0
func (x *AllocationResponse_GameServerMetadata) ProtoReflect() protoreflect.Message
func (*AllocationResponse_GameServerMetadata) Reset ¶ added in v1.33.0
func (x *AllocationResponse_GameServerMetadata) Reset()
func (*AllocationResponse_GameServerMetadata) String ¶ added in v1.33.0
func (x *AllocationResponse_GameServerMetadata) String() string
type AllocationResponse_GameServerStatusAddress ¶ added in v1.34.0
type AllocationResponse_GameServerStatusAddress struct {
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
// contains filtered or unexported fields
}
A single address; identical to corev1.NodeAddress
func (*AllocationResponse_GameServerStatusAddress) Descriptor
deprecated
added in
v1.34.0
func (*AllocationResponse_GameServerStatusAddress) Descriptor() ([]byte, []int)
Deprecated: Use AllocationResponse_GameServerStatusAddress.ProtoReflect.Descriptor instead.
func (*AllocationResponse_GameServerStatusAddress) GetAddress ¶ added in v1.34.0
func (x *AllocationResponse_GameServerStatusAddress) GetAddress() string
func (*AllocationResponse_GameServerStatusAddress) GetType ¶ added in v1.34.0
func (x *AllocationResponse_GameServerStatusAddress) GetType() string
func (*AllocationResponse_GameServerStatusAddress) ProtoMessage ¶ added in v1.34.0
func (*AllocationResponse_GameServerStatusAddress) ProtoMessage()
func (*AllocationResponse_GameServerStatusAddress) ProtoReflect ¶ added in v1.34.0
func (x *AllocationResponse_GameServerStatusAddress) ProtoReflect() protoreflect.Message
func (*AllocationResponse_GameServerStatusAddress) Reset ¶ added in v1.34.0
func (x *AllocationResponse_GameServerStatusAddress) Reset()
func (*AllocationResponse_GameServerStatusAddress) String ¶ added in v1.34.0
func (x *AllocationResponse_GameServerStatusAddress) String() string
type AllocationResponse_GameServerStatusPort ¶
type AllocationResponse_GameServerStatusPort struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
// contains filtered or unexported fields
}
The gameserver port info that is allocated.
func (*AllocationResponse_GameServerStatusPort) Descriptor
deprecated
func (*AllocationResponse_GameServerStatusPort) Descriptor() ([]byte, []int)
Deprecated: Use AllocationResponse_GameServerStatusPort.ProtoReflect.Descriptor instead.
func (*AllocationResponse_GameServerStatusPort) GetName ¶
func (x *AllocationResponse_GameServerStatusPort) GetName() string
func (*AllocationResponse_GameServerStatusPort) GetPort ¶
func (x *AllocationResponse_GameServerStatusPort) GetPort() int32
func (*AllocationResponse_GameServerStatusPort) ProtoMessage ¶
func (*AllocationResponse_GameServerStatusPort) ProtoMessage()
func (*AllocationResponse_GameServerStatusPort) ProtoReflect ¶ added in v1.29.0
func (x *AllocationResponse_GameServerStatusPort) ProtoReflect() protoreflect.Message
func (*AllocationResponse_GameServerStatusPort) Reset ¶
func (x *AllocationResponse_GameServerStatusPort) Reset()
func (*AllocationResponse_GameServerStatusPort) String ¶
func (x *AllocationResponse_GameServerStatusPort) String() string
type AllocationResponse_ListStatus ¶ added in v1.39.0
type AllocationResponse_ListStatus struct {
Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
Capacity *wrapperspb.Int64Value `protobuf:"bytes,2,opt,name=capacity,proto3" json:"capacity,omitempty"`
// contains filtered or unexported fields
}
func (*AllocationResponse_ListStatus) Descriptor
deprecated
added in
v1.39.0
func (*AllocationResponse_ListStatus) Descriptor() ([]byte, []int)
Deprecated: Use AllocationResponse_ListStatus.ProtoReflect.Descriptor instead.
func (*AllocationResponse_ListStatus) GetCapacity ¶ added in v1.39.0
func (x *AllocationResponse_ListStatus) GetCapacity() *wrapperspb.Int64Value
func (*AllocationResponse_ListStatus) GetValues ¶ added in v1.39.0
func (x *AllocationResponse_ListStatus) GetValues() []string
func (*AllocationResponse_ListStatus) ProtoMessage ¶ added in v1.39.0
func (*AllocationResponse_ListStatus) ProtoMessage()
func (*AllocationResponse_ListStatus) ProtoReflect ¶ added in v1.39.0
func (x *AllocationResponse_ListStatus) ProtoReflect() protoreflect.Message
func (*AllocationResponse_ListStatus) Reset ¶ added in v1.39.0
func (x *AllocationResponse_ListStatus) Reset()
func (*AllocationResponse_ListStatus) String ¶ added in v1.39.0
func (x *AllocationResponse_ListStatus) String() string
type AllocationServiceClient ¶
type AllocationServiceClient interface {
Allocate(ctx context.Context, in *AllocationRequest, opts ...grpc.CallOption) (*AllocationResponse, error)
}
AllocationServiceClient is the client API for AllocationService 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 NewAllocationServiceClient ¶
func NewAllocationServiceClient(cc grpc.ClientConnInterface) AllocationServiceClient
type AllocationServiceServer ¶
type AllocationServiceServer interface {
Allocate(context.Context, *AllocationRequest) (*AllocationResponse, error)
}
AllocationServiceServer is the server API for AllocationService service. All implementations should embed UnimplementedAllocationServiceServer for forward compatibility
type BatchRequest ¶ added in v1.52.0
type BatchRequest struct {
// Unique batch ID for tracking
BatchId string `protobuf:"bytes,1,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"`
// List of allocation requests
Requests []*RequestWrapper `protobuf:"bytes,2,rep,name=requests,proto3" json:"requests,omitempty"`
// contains filtered or unexported fields
}
BatchRequest to encapsulate multiple allocation requests This is used to send a batch of requests in a single gRPC call.
func (*BatchRequest) Descriptor
deprecated
added in
v1.52.0
func (*BatchRequest) Descriptor() ([]byte, []int)
Deprecated: Use BatchRequest.ProtoReflect.Descriptor instead.
func (*BatchRequest) GetBatchId ¶ added in v1.52.0
func (x *BatchRequest) GetBatchId() string
func (*BatchRequest) GetRequests ¶ added in v1.52.0
func (x *BatchRequest) GetRequests() []*RequestWrapper
func (*BatchRequest) ProtoMessage ¶ added in v1.52.0
func (*BatchRequest) ProtoMessage()
func (*BatchRequest) ProtoReflect ¶ added in v1.52.0
func (x *BatchRequest) ProtoReflect() protoreflect.Message
func (*BatchRequest) Reset ¶ added in v1.52.0
func (x *BatchRequest) Reset()
func (*BatchRequest) String ¶ added in v1.52.0
func (x *BatchRequest) String() string
type BatchResponse ¶ added in v1.52.0
type BatchResponse struct {
// Unique batch ID for tracking
BatchId string `protobuf:"bytes,1,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"`
// List of responses for each request in the batch
Responses []*ResponseWrapper `protobuf:"bytes,2,rep,name=responses,proto3" json:"responses,omitempty"`
// contains filtered or unexported fields
}
BatchResponse to encapsulate multiple allocation responses
func (*BatchResponse) Descriptor
deprecated
added in
v1.52.0
func (*BatchResponse) Descriptor() ([]byte, []int)
Deprecated: Use BatchResponse.ProtoReflect.Descriptor instead.
func (*BatchResponse) GetBatchId ¶ added in v1.52.0
func (x *BatchResponse) GetBatchId() string
func (*BatchResponse) GetResponses ¶ added in v1.52.0
func (x *BatchResponse) GetResponses() []*ResponseWrapper
func (*BatchResponse) ProtoMessage ¶ added in v1.52.0
func (*BatchResponse) ProtoMessage()
func (*BatchResponse) ProtoReflect ¶ added in v1.52.0
func (x *BatchResponse) ProtoReflect() protoreflect.Message
func (*BatchResponse) Reset ¶ added in v1.52.0
func (x *BatchResponse) Reset()
func (*BatchResponse) String ¶ added in v1.52.0
func (x *BatchResponse) String() string
type CounterAction ¶ added in v1.36.0
type CounterAction struct {
Action *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"`
Amount *wrapperspb.Int64Value `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"`
Capacity *wrapperspb.Int64Value `protobuf:"bytes,3,opt,name=capacity,proto3" json:"capacity,omitempty"`
// contains filtered or unexported fields
}
CounterAction is an optional action that can be performed on a Counter at allocation. Action: "Increment" or "Decrement" the Counter's Count (optional). Must also define the Amount. Amount: The amount to increment or decrement the Count (optional). Must be a positive integer. Capacity: Update the maximum capacity of the Counter to this number (optional). Min 0, Max int64.
func (*CounterAction) Descriptor
deprecated
added in
v1.36.0
func (*CounterAction) Descriptor() ([]byte, []int)
Deprecated: Use CounterAction.ProtoReflect.Descriptor instead.
func (*CounterAction) GetAction ¶ added in v1.36.0
func (x *CounterAction) GetAction() *wrapperspb.StringValue
func (*CounterAction) GetAmount ¶ added in v1.36.0
func (x *CounterAction) GetAmount() *wrapperspb.Int64Value
func (*CounterAction) GetCapacity ¶ added in v1.36.0
func (x *CounterAction) GetCapacity() *wrapperspb.Int64Value
func (*CounterAction) ProtoMessage ¶ added in v1.36.0
func (*CounterAction) ProtoMessage()
func (*CounterAction) ProtoReflect ¶ added in v1.36.0
func (x *CounterAction) ProtoReflect() protoreflect.Message
func (*CounterAction) Reset ¶ added in v1.36.0
func (x *CounterAction) Reset()
func (*CounterAction) String ¶ added in v1.36.0
func (x *CounterAction) String() string
type CounterSelector ¶ added in v1.32.0
type CounterSelector struct {
MinCount int64 `protobuf:"varint,1,opt,name=minCount,proto3" json:"minCount,omitempty"`
MaxCount int64 `protobuf:"varint,2,opt,name=maxCount,proto3" json:"maxCount,omitempty"`
MinAvailable int64 `protobuf:"varint,3,opt,name=minAvailable,proto3" json:"minAvailable,omitempty"`
MaxAvailable int64 `protobuf:"varint,4,opt,name=maxAvailable,proto3" json:"maxAvailable,omitempty"`
// contains filtered or unexported fields
}
CounterSelector is the filter options for a GameServer based on the count and/or available capacity. 0 for MaxCount or MaxAvailable means unlimited maximum. Default for all fields: 0
func (*CounterSelector) Descriptor
deprecated
added in
v1.32.0
func (*CounterSelector) Descriptor() ([]byte, []int)
Deprecated: Use CounterSelector.ProtoReflect.Descriptor instead.
func (*CounterSelector) GetMaxAvailable ¶ added in v1.32.0
func (x *CounterSelector) GetMaxAvailable() int64
func (*CounterSelector) GetMaxCount ¶ added in v1.32.0
func (x *CounterSelector) GetMaxCount() int64
func (*CounterSelector) GetMinAvailable ¶ added in v1.32.0
func (x *CounterSelector) GetMinAvailable() int64
func (*CounterSelector) GetMinCount ¶ added in v1.32.0
func (x *CounterSelector) GetMinCount() int64
func (*CounterSelector) ProtoMessage ¶ added in v1.32.0
func (*CounterSelector) ProtoMessage()
func (*CounterSelector) ProtoReflect ¶ added in v1.32.0
func (x *CounterSelector) ProtoReflect() protoreflect.Message
func (*CounterSelector) Reset ¶ added in v1.32.0
func (x *CounterSelector) Reset()
func (*CounterSelector) String ¶ added in v1.32.0
func (x *CounterSelector) String() string
type GameServerSelector ¶ added in v1.17.0
type GameServerSelector struct {
// Labels to match.
MatchLabels map[string]string `` /* 163-byte string literal not displayed */
GameServerState GameServerSelector_GameServerState `` /* 135-byte string literal not displayed */
Counters map[string]*CounterSelector `` /* 157-byte string literal not displayed */
Lists map[string]*ListSelector `` /* 151-byte string literal not displayed */
// matchExpressions is a list of label selector requirements. The requirements are ANDed
// with matchLabels.
MatchExpressions []*LabelMatchExpressions `protobuf:"bytes,6,rep,name=matchExpressions,proto3" json:"matchExpressions,omitempty"`
// contains filtered or unexported fields
}
GameServerSelector used for finding a GameServer with matching filters.
func (*GameServerSelector) Descriptor
deprecated
added in
v1.17.0
func (*GameServerSelector) Descriptor() ([]byte, []int)
Deprecated: Use GameServerSelector.ProtoReflect.Descriptor instead.
func (*GameServerSelector) GetCounters ¶ added in v1.32.0
func (x *GameServerSelector) GetCounters() map[string]*CounterSelector
func (*GameServerSelector) GetGameServerState ¶ added in v1.17.0
func (x *GameServerSelector) GetGameServerState() GameServerSelector_GameServerState
func (*GameServerSelector) GetLists ¶ added in v1.32.0
func (x *GameServerSelector) GetLists() map[string]*ListSelector
func (*GameServerSelector) GetMatchExpressions ¶ added in v1.59.0
func (x *GameServerSelector) GetMatchExpressions() []*LabelMatchExpressions
func (*GameServerSelector) GetMatchLabels ¶ added in v1.17.0
func (x *GameServerSelector) GetMatchLabels() map[string]string
func (*GameServerSelector) ProtoMessage ¶ added in v1.17.0
func (*GameServerSelector) ProtoMessage()
func (*GameServerSelector) ProtoReflect ¶ added in v1.29.0
func (x *GameServerSelector) ProtoReflect() protoreflect.Message
func (*GameServerSelector) Reset ¶ added in v1.17.0
func (x *GameServerSelector) Reset()
func (*GameServerSelector) String ¶ added in v1.17.0
func (x *GameServerSelector) String() string
type GameServerSelector_GameServerState ¶ added in v1.17.0
type GameServerSelector_GameServerState int32
const ( GameServerSelector_READY GameServerSelector_GameServerState = 0 GameServerSelector_ALLOCATED GameServerSelector_GameServerState = 1 )
func (GameServerSelector_GameServerState) Descriptor ¶ added in v1.29.0
func (GameServerSelector_GameServerState) Descriptor() protoreflect.EnumDescriptor
func (GameServerSelector_GameServerState) Enum ¶ added in v1.29.0
func (x GameServerSelector_GameServerState) Enum() *GameServerSelector_GameServerState
func (GameServerSelector_GameServerState) EnumDescriptor
deprecated
added in
v1.17.0
func (GameServerSelector_GameServerState) EnumDescriptor() ([]byte, []int)
Deprecated: Use GameServerSelector_GameServerState.Descriptor instead.
func (GameServerSelector_GameServerState) Number ¶ added in v1.29.0
func (x GameServerSelector_GameServerState) Number() protoreflect.EnumNumber
func (GameServerSelector_GameServerState) String ¶ added in v1.17.0
func (x GameServerSelector_GameServerState) String() string
func (GameServerSelector_GameServerState) Type ¶ added in v1.29.0
func (GameServerSelector_GameServerState) Type() protoreflect.EnumType
type LabelMatchExpressions ¶ added in v1.59.0
type LabelMatchExpressions struct {
// key is the label key that the selector applies to.
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Operator LabelMatchExpressions_Operator `protobuf:"varint,2,opt,name=operator,proto3,enum=allocation.LabelMatchExpressions_Operator" json:"operator,omitempty"`
// values is an array of string values.
Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"`
// contains filtered or unexported fields
}
LabelMatchExpressions is a selector that contains values, a key, and an operator that relates the key and values. The requirements are ANDed.
func (*LabelMatchExpressions) Descriptor
deprecated
added in
v1.59.0
func (*LabelMatchExpressions) Descriptor() ([]byte, []int)
Deprecated: Use LabelMatchExpressions.ProtoReflect.Descriptor instead.
func (*LabelMatchExpressions) GetKey ¶ added in v1.59.0
func (x *LabelMatchExpressions) GetKey() string
func (*LabelMatchExpressions) GetOperator ¶ added in v1.59.0
func (x *LabelMatchExpressions) GetOperator() LabelMatchExpressions_Operator
func (*LabelMatchExpressions) GetValues ¶ added in v1.59.0
func (x *LabelMatchExpressions) GetValues() []string
func (*LabelMatchExpressions) ProtoMessage ¶ added in v1.59.0
func (*LabelMatchExpressions) ProtoMessage()
func (*LabelMatchExpressions) ProtoReflect ¶ added in v1.59.0
func (x *LabelMatchExpressions) ProtoReflect() protoreflect.Message
func (*LabelMatchExpressions) Reset ¶ added in v1.59.0
func (x *LabelMatchExpressions) Reset()
func (*LabelMatchExpressions) String ¶ added in v1.59.0
func (x *LabelMatchExpressions) String() string
type LabelMatchExpressions_Operator ¶ added in v1.59.0
type LabelMatchExpressions_Operator int32
operator represents a key's relationship to a set of values. In and NotIn require a non-empty values array; Exists and DoesNotExist require an empty one.
const ( LabelMatchExpressions_In LabelMatchExpressions_Operator = 0 LabelMatchExpressions_NotIn LabelMatchExpressions_Operator = 1 LabelMatchExpressions_Exists LabelMatchExpressions_Operator = 2 LabelMatchExpressions_DoesNotExist LabelMatchExpressions_Operator = 3 )
func (LabelMatchExpressions_Operator) Descriptor ¶ added in v1.59.0
func (LabelMatchExpressions_Operator) Descriptor() protoreflect.EnumDescriptor
func (LabelMatchExpressions_Operator) Enum ¶ added in v1.59.0
func (x LabelMatchExpressions_Operator) Enum() *LabelMatchExpressions_Operator
func (LabelMatchExpressions_Operator) EnumDescriptor
deprecated
added in
v1.59.0
func (LabelMatchExpressions_Operator) EnumDescriptor() ([]byte, []int)
Deprecated: Use LabelMatchExpressions_Operator.Descriptor instead.
func (LabelMatchExpressions_Operator) Number ¶ added in v1.59.0
func (x LabelMatchExpressions_Operator) Number() protoreflect.EnumNumber
func (LabelMatchExpressions_Operator) String ¶ added in v1.59.0
func (x LabelMatchExpressions_Operator) String() string
func (LabelMatchExpressions_Operator) Type ¶ added in v1.59.0
func (LabelMatchExpressions_Operator) Type() protoreflect.EnumType
type LabelSelector ¶
type LabelSelector struct {
// Labels to match.
MatchLabels map[string]string `` /* 163-byte string literal not displayed */
// contains filtered or unexported fields
}
LabelSelector used for finding a GameServer with matching labels.
func (*LabelSelector) Descriptor
deprecated
func (*LabelSelector) Descriptor() ([]byte, []int)
Deprecated: Use LabelSelector.ProtoReflect.Descriptor instead.
func (*LabelSelector) GetMatchLabels ¶
func (x *LabelSelector) GetMatchLabels() map[string]string
func (*LabelSelector) ProtoMessage ¶
func (*LabelSelector) ProtoMessage()
func (*LabelSelector) ProtoReflect ¶ added in v1.29.0
func (x *LabelSelector) ProtoReflect() protoreflect.Message
func (*LabelSelector) Reset ¶
func (x *LabelSelector) Reset()
func (*LabelSelector) String ¶
func (x *LabelSelector) String() string
type ListAction ¶ added in v1.36.0
type ListAction struct {
AddValues []string `protobuf:"bytes,1,rep,name=addValues,proto3" json:"addValues,omitempty"`
Capacity *wrapperspb.Int64Value `protobuf:"bytes,2,opt,name=capacity,proto3" json:"capacity,omitempty"`
DeleteValues []string `protobuf:"bytes,3,rep,name=deleteValues,proto3" json:"deleteValues,omitempty"`
// contains filtered or unexported fields
}
ListAction is an optional action that can be performed on a List at allocation. AddValues: Append values to a List's Values array (optional). Any duplicate values will be ignored. Capacity: Update the maximum capacity of the Counter to this number (optional). Min 0, Max 1000. DeleteValues: Remove values from a List's Values array (optional). Any nonexistant values will be ignored.
func (*ListAction) Descriptor
deprecated
added in
v1.36.0
func (*ListAction) Descriptor() ([]byte, []int)
Deprecated: Use ListAction.ProtoReflect.Descriptor instead.
func (*ListAction) GetAddValues ¶ added in v1.36.0
func (x *ListAction) GetAddValues() []string
func (*ListAction) GetCapacity ¶ added in v1.36.0
func (x *ListAction) GetCapacity() *wrapperspb.Int64Value
func (*ListAction) GetDeleteValues ¶ added in v1.46.0
func (x *ListAction) GetDeleteValues() []string
func (*ListAction) ProtoMessage ¶ added in v1.36.0
func (*ListAction) ProtoMessage()
func (*ListAction) ProtoReflect ¶ added in v1.36.0
func (x *ListAction) ProtoReflect() protoreflect.Message
func (*ListAction) Reset ¶ added in v1.36.0
func (x *ListAction) Reset()
func (*ListAction) String ¶ added in v1.36.0
func (x *ListAction) String() string
type ListSelector ¶ added in v1.32.0
type ListSelector struct {
ContainsValue string `protobuf:"bytes,1,opt,name=containsValue,proto3" json:"containsValue,omitempty"`
MinAvailable int64 `protobuf:"varint,2,opt,name=minAvailable,proto3" json:"minAvailable,omitempty"`
MaxAvailable int64 `protobuf:"varint,3,opt,name=maxAvailable,proto3" json:"maxAvailable,omitempty"`
// contains filtered or unexported fields
}
ListSelector is the filter options for a GameServer based on List available capacity and/or the existence of a value in a List. 0 for MaxAvailable means unlimited maximum. Default for integer fields: 0 "" for ContainsValue means ignore field. Default for string field: ""
func (*ListSelector) Descriptor
deprecated
added in
v1.32.0
func (*ListSelector) Descriptor() ([]byte, []int)
Deprecated: Use ListSelector.ProtoReflect.Descriptor instead.
func (*ListSelector) GetContainsValue ¶ added in v1.32.0
func (x *ListSelector) GetContainsValue() string
func (*ListSelector) GetMaxAvailable ¶ added in v1.32.0
func (x *ListSelector) GetMaxAvailable() int64
func (*ListSelector) GetMinAvailable ¶ added in v1.32.0
func (x *ListSelector) GetMinAvailable() int64
func (*ListSelector) ProtoMessage ¶ added in v1.32.0
func (*ListSelector) ProtoMessage()
func (*ListSelector) ProtoReflect ¶ added in v1.32.0
func (x *ListSelector) ProtoReflect() protoreflect.Message
func (*ListSelector) Reset ¶ added in v1.32.0
func (x *ListSelector) Reset()
func (*ListSelector) String ¶ added in v1.32.0
func (x *ListSelector) String() string
type MetaPatch ¶
type MetaPatch struct {
Labels map[string]string `` /* 153-byte string literal not displayed */
Annotations map[string]string `` /* 163-byte string literal not displayed */
// contains filtered or unexported fields
}
MetaPatch is the metadata used to patch the GameServer metadata on allocation
func (*MetaPatch) Descriptor
deprecated
func (*MetaPatch) GetAnnotations ¶
func (*MetaPatch) ProtoMessage ¶
func (*MetaPatch) ProtoMessage()
func (*MetaPatch) ProtoReflect ¶ added in v1.29.0
func (x *MetaPatch) ProtoReflect() protoreflect.Message
type MultiClusterSetting ¶
type MultiClusterSetting struct {
// If set to true, multi-cluster allocation is enabled.
Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
// Selects multi-cluster allocation policies to apply. If not specified, all multi-cluster allocation policies are to be applied.
PolicySelector *LabelSelector `protobuf:"bytes,2,opt,name=policySelector,proto3" json:"policySelector,omitempty"`
// contains filtered or unexported fields
}
Specifies settings for multi-cluster allocation.
func (*MultiClusterSetting) Descriptor
deprecated
func (*MultiClusterSetting) Descriptor() ([]byte, []int)
Deprecated: Use MultiClusterSetting.ProtoReflect.Descriptor instead.
func (*MultiClusterSetting) GetEnabled ¶
func (x *MultiClusterSetting) GetEnabled() bool
func (*MultiClusterSetting) GetPolicySelector ¶
func (x *MultiClusterSetting) GetPolicySelector() *LabelSelector
func (*MultiClusterSetting) ProtoMessage ¶
func (*MultiClusterSetting) ProtoMessage()
func (*MultiClusterSetting) ProtoReflect ¶ added in v1.29.0
func (x *MultiClusterSetting) ProtoReflect() protoreflect.Message
func (*MultiClusterSetting) Reset ¶
func (x *MultiClusterSetting) Reset()
func (*MultiClusterSetting) String ¶
func (x *MultiClusterSetting) String() string
type Priority ¶ added in v1.32.0
type Priority struct {
Type Priority_Type `protobuf:"varint,1,opt,name=type,proto3,enum=allocation.Priority_Type" json:"type,omitempty"`
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
Order Priority_Order `protobuf:"varint,3,opt,name=order,proto3,enum=allocation.Priority_Order" json:"order,omitempty"`
// contains filtered or unexported fields
}
Priority is a sorting option for GameServers with Counters or Lists based on the Capacity. Type: Sort by a "Counter" or a "List". Key: The name of the Counter or List. If not found on the GameServer, has no impact. Order: Sort by "Ascending" or "Descending". "Descending" a bigger Capacity is preferred. "Ascending" would be smaller Capacity is preferred.
func (*Priority) Descriptor
deprecated
added in
v1.32.0
func (*Priority) GetOrder ¶ added in v1.32.0
func (x *Priority) GetOrder() Priority_Order
func (*Priority) GetType ¶ added in v1.34.0
func (x *Priority) GetType() Priority_Type
func (*Priority) ProtoMessage ¶ added in v1.32.0
func (*Priority) ProtoMessage()
func (*Priority) ProtoReflect ¶ added in v1.32.0
func (x *Priority) ProtoReflect() protoreflect.Message
type Priority_Order ¶ added in v1.34.0
type Priority_Order int32
const ( Priority_Ascending Priority_Order = 0 Priority_Descending Priority_Order = 1 )
func (Priority_Order) Descriptor ¶ added in v1.34.0
func (Priority_Order) Descriptor() protoreflect.EnumDescriptor
func (Priority_Order) Enum ¶ added in v1.34.0
func (x Priority_Order) Enum() *Priority_Order
func (Priority_Order) EnumDescriptor
deprecated
added in
v1.34.0
func (Priority_Order) EnumDescriptor() ([]byte, []int)
Deprecated: Use Priority_Order.Descriptor instead.
func (Priority_Order) Number ¶ added in v1.34.0
func (x Priority_Order) Number() protoreflect.EnumNumber
func (Priority_Order) String ¶ added in v1.34.0
func (x Priority_Order) String() string
func (Priority_Order) Type ¶ added in v1.34.0
func (Priority_Order) Type() protoreflect.EnumType
type Priority_Type ¶ added in v1.34.0
type Priority_Type int32
const ( Priority_Counter Priority_Type = 0 Priority_List Priority_Type = 1 )
func (Priority_Type) Descriptor ¶ added in v1.34.0
func (Priority_Type) Descriptor() protoreflect.EnumDescriptor
func (Priority_Type) Enum ¶ added in v1.34.0
func (x Priority_Type) Enum() *Priority_Type
func (Priority_Type) EnumDescriptor
deprecated
added in
v1.34.0
func (Priority_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use Priority_Type.Descriptor instead.
func (Priority_Type) Number ¶ added in v1.34.0
func (x Priority_Type) Number() protoreflect.EnumNumber
func (Priority_Type) String ¶ added in v1.34.0
func (x Priority_Type) String() string
func (Priority_Type) Type ¶ added in v1.34.0
func (Priority_Type) Type() protoreflect.EnumType
type ProcessorClient ¶ added in v1.52.0
type ProcessorClient interface {
// StreamBatches processes a stream of ProcessorMessage requests and returns a stream of ProcessorMessage responses.
StreamBatches(ctx context.Context, opts ...grpc.CallOption) (Processor_StreamBatchesClient, error)
}
ProcessorClient is the client API for Processor 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 NewProcessorClient ¶ added in v1.52.0
func NewProcessorClient(cc grpc.ClientConnInterface) ProcessorClient
type ProcessorMessage ¶ added in v1.52.0
type ProcessorMessage struct {
// The client ID is used to identify the client that is sending the message.
ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
// The payload is a oneof field that can contain either a PullRequest, Batch, or BatchResponse.
//
// Types that are assignable to Payload:
//
// *ProcessorMessage_Pull
// *ProcessorMessage_BatchRequest
// *ProcessorMessage_BatchResponse
Payload isProcessorMessage_Payload `protobuf_oneof:"payload"`
// contains filtered or unexported fields
}
The ProcessorMessage is used to send and receive messages between the client and server.
func (*ProcessorMessage) Descriptor
deprecated
added in
v1.52.0
func (*ProcessorMessage) Descriptor() ([]byte, []int)
Deprecated: Use ProcessorMessage.ProtoReflect.Descriptor instead.
func (*ProcessorMessage) GetBatchRequest ¶ added in v1.52.0
func (x *ProcessorMessage) GetBatchRequest() *BatchRequest
func (*ProcessorMessage) GetBatchResponse ¶ added in v1.52.0
func (x *ProcessorMessage) GetBatchResponse() *BatchResponse
func (*ProcessorMessage) GetClientId ¶ added in v1.52.0
func (x *ProcessorMessage) GetClientId() string
func (*ProcessorMessage) GetPayload ¶ added in v1.52.0
func (m *ProcessorMessage) GetPayload() isProcessorMessage_Payload
func (*ProcessorMessage) GetPull ¶ added in v1.52.0
func (x *ProcessorMessage) GetPull() *PullRequest
func (*ProcessorMessage) ProtoMessage ¶ added in v1.52.0
func (*ProcessorMessage) ProtoMessage()
func (*ProcessorMessage) ProtoReflect ¶ added in v1.52.0
func (x *ProcessorMessage) ProtoReflect() protoreflect.Message
func (*ProcessorMessage) Reset ¶ added in v1.52.0
func (x *ProcessorMessage) Reset()
func (*ProcessorMessage) String ¶ added in v1.52.0
func (x *ProcessorMessage) String() string
type ProcessorMessage_BatchRequest ¶ added in v1.52.0
type ProcessorMessage_BatchRequest struct {
// A BatchRequest is used to send a batch of allocation requests.
BatchRequest *BatchRequest `protobuf:"bytes,3,opt,name=batch_request,json=batchRequest,proto3,oneof"`
}
type ProcessorMessage_BatchResponse ¶ added in v1.52.0
type ProcessorMessage_BatchResponse struct {
// A BatchResponse is used to send a response to a batch of allocation requests.
BatchResponse *BatchResponse `protobuf:"bytes,4,opt,name=batch_response,json=batchResponse,proto3,oneof"`
}
type ProcessorMessage_Pull ¶ added in v1.52.0
type ProcessorMessage_Pull struct {
// A PullRequest is used to request a batch of allocation requests.
Pull *PullRequest `protobuf:"bytes,2,opt,name=pull,proto3,oneof"`
}
type ProcessorServer ¶ added in v1.52.0
type ProcessorServer interface {
// StreamBatches processes a stream of ProcessorMessage requests and returns a stream of ProcessorMessage responses.
StreamBatches(Processor_StreamBatchesServer) error
}
ProcessorServer is the server API for Processor service. All implementations should embed UnimplementedProcessorServer for forward compatibility
type Processor_StreamBatchesClient ¶ added in v1.52.0
type Processor_StreamBatchesClient interface {
Send(*ProcessorMessage) error
Recv() (*ProcessorMessage, error)
grpc.ClientStream
}
type Processor_StreamBatchesServer ¶ added in v1.52.0
type Processor_StreamBatchesServer interface {
Send(*ProcessorMessage) error
Recv() (*ProcessorMessage, error)
grpc.ServerStream
}
type PullRequest ¶ added in v1.52.0
type PullRequest struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
A PullRequest is used to request a batch of allocation requests.
func (*PullRequest) Descriptor
deprecated
added in
v1.52.0
func (*PullRequest) Descriptor() ([]byte, []int)
Deprecated: Use PullRequest.ProtoReflect.Descriptor instead.
func (*PullRequest) GetMessage ¶ added in v1.52.0
func (x *PullRequest) GetMessage() string
func (*PullRequest) ProtoMessage ¶ added in v1.52.0
func (*PullRequest) ProtoMessage()
func (*PullRequest) ProtoReflect ¶ added in v1.52.0
func (x *PullRequest) ProtoReflect() protoreflect.Message
func (*PullRequest) Reset ¶ added in v1.52.0
func (x *PullRequest) Reset()
func (*PullRequest) String ¶ added in v1.52.0
func (x *PullRequest) String() string
type RequestWrapper ¶ added in v1.52.0
type RequestWrapper struct {
// Unique request ID for tracking
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
// The actual allocation request
Request *AllocationRequest `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
// contains filtered or unexported fields
}
RequestWrapper to encapsulate individual allocation requests
func (*RequestWrapper) Descriptor
deprecated
added in
v1.52.0
func (*RequestWrapper) Descriptor() ([]byte, []int)
Deprecated: Use RequestWrapper.ProtoReflect.Descriptor instead.
func (*RequestWrapper) GetRequest ¶ added in v1.52.0
func (x *RequestWrapper) GetRequest() *AllocationRequest
func (*RequestWrapper) GetRequestId ¶ added in v1.52.0
func (x *RequestWrapper) GetRequestId() string
func (*RequestWrapper) ProtoMessage ¶ added in v1.52.0
func (*RequestWrapper) ProtoMessage()
func (*RequestWrapper) ProtoReflect ¶ added in v1.52.0
func (x *RequestWrapper) ProtoReflect() protoreflect.Message
func (*RequestWrapper) Reset ¶ added in v1.52.0
func (x *RequestWrapper) Reset()
func (*RequestWrapper) String ¶ added in v1.52.0
func (x *RequestWrapper) String() string
type ResponseWrapper ¶ added in v1.52.0
type ResponseWrapper struct {
// Unique request ID for tracking
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
// The actual allocation response
//
// Types that are assignable to Result:
//
// *ResponseWrapper_Response
// *ResponseWrapper_Error
Result isResponseWrapper_Result `protobuf_oneof:"result"`
// contains filtered or unexported fields
}
ResponseWrapper to encapsulate individual allocation responses
func (*ResponseWrapper) Descriptor
deprecated
added in
v1.52.0
func (*ResponseWrapper) Descriptor() ([]byte, []int)
Deprecated: Use ResponseWrapper.ProtoReflect.Descriptor instead.
func (*ResponseWrapper) GetError ¶ added in v1.52.0
func (x *ResponseWrapper) GetError() *status.Status
func (*ResponseWrapper) GetRequestId ¶ added in v1.52.0
func (x *ResponseWrapper) GetRequestId() string
func (*ResponseWrapper) GetResponse ¶ added in v1.52.0
func (x *ResponseWrapper) GetResponse() *AllocationResponse
func (*ResponseWrapper) GetResult ¶ added in v1.52.0
func (m *ResponseWrapper) GetResult() isResponseWrapper_Result
func (*ResponseWrapper) ProtoMessage ¶ added in v1.52.0
func (*ResponseWrapper) ProtoMessage()
func (*ResponseWrapper) ProtoReflect ¶ added in v1.52.0
func (x *ResponseWrapper) ProtoReflect() protoreflect.Message
func (*ResponseWrapper) Reset ¶ added in v1.52.0
func (x *ResponseWrapper) Reset()
func (*ResponseWrapper) String ¶ added in v1.52.0
func (x *ResponseWrapper) String() string
type ResponseWrapper_Error ¶ added in v1.52.0
type ResponseWrapper_Response ¶ added in v1.52.0
type ResponseWrapper_Response struct {
// Successful response
Response *AllocationResponse `protobuf:"bytes,2,opt,name=response,proto3,oneof"`
}
type UnimplementedAllocationServiceServer ¶ added in v1.29.0
type UnimplementedAllocationServiceServer struct {
}
UnimplementedAllocationServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedAllocationServiceServer) Allocate ¶ added in v1.29.0
func (UnimplementedAllocationServiceServer) Allocate(context.Context, *AllocationRequest) (*AllocationResponse, error)
type UnimplementedProcessorServer ¶ added in v1.52.0
type UnimplementedProcessorServer struct {
}
UnimplementedProcessorServer should be embedded to have forward compatible implementations.
func (UnimplementedProcessorServer) StreamBatches ¶ added in v1.52.0
func (UnimplementedProcessorServer) StreamBatches(Processor_StreamBatchesServer) error
type UnsafeAllocationServiceServer ¶ added in v1.29.0
type UnsafeAllocationServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAllocationServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AllocationServiceServer will result in compilation errors.
type UnsafeProcessorServer ¶ added in v1.52.0
type UnsafeProcessorServer interface {
// contains filtered or unexported methods
}
UnsafeProcessorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProcessorServer will result in compilation errors.