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)
- type AllocationRequest
- func (*AllocationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AllocationRequest) GetGameServerSelectors() []*GameServerSelector
- 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) GetGameServerName() string
- 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_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_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 AllocationServiceClient
- type AllocationServiceServer
- 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) GetMatchLabels() map[string]string
- func (x *GameServerSelector) GetPlayers() *PlayerSelector
- 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 LabelSelector
- 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 PlayerSelector
- func (*PlayerSelector) Descriptor() ([]byte, []int)deprecated
- func (x *PlayerSelector) GetMaxAvailable() uint64
- func (x *PlayerSelector) GetMinAvailable() uint64
- func (*PlayerSelector) ProtoMessage()
- func (x *PlayerSelector) ProtoReflect() protoreflect.Message
- func (x *PlayerSelector) Reset()
- func (x *PlayerSelector) String() string
- type Priority
- func (*Priority) Descriptor() ([]byte, []int)deprecated
- func (x *Priority) GetKey() string
- func (x *Priority) GetOrder() string
- func (x *Priority) GetPriorityType() string
- func (*Priority) ProtoMessage()
- func (x *Priority) ProtoReflect() protoreflect.Message
- func (x *Priority) Reset()
- func (x *Priority) String() string
- type UnimplementedAllocationServiceServer
- type UnsafeAllocationServiceServer
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 ( 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 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
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.
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.
func RegisterAllocationServiceServer ¶
func RegisterAllocationServiceServer(s grpc.ServiceRegistrar, srv AllocationServiceServer)
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"` // (Alpha, CountsAndLists feature flag) The first Priority on the array of Priorities is the most // important for sorting. The allocator will use the first priority for sorting GameServers in the // Selector set, and will only use any following priority for tie-breaking during sort. // Impacts which GameServer is checked first. Priorities []*Priority `protobuf:"bytes,9,rep,name=priorities,proto3" json:"priorities,omitempty"` // contains filtered or unexported fields }
func (*AllocationRequest) Descriptor
deprecated
func (*AllocationRequest) Descriptor() ([]byte, []int)
Deprecated: Use AllocationRequest.ProtoReflect.Descriptor instead.
func (*AllocationRequest) GetGameServerSelectors ¶ added in v1.17.0
func (x *AllocationRequest) GetGameServerSelectors() []*GameServerSelector
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"` Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,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"` // 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) GetGameServerName ¶
func (x *AllocationResponse) GetGameServerName() string
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_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_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 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 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 */ Players *PlayerSelector `protobuf:"bytes,3,opt,name=players,proto3" json:"players,omitempty"` Counters map[string]*CounterSelector `` /* 157-byte string literal not displayed */ Lists map[string]*ListSelector `` /* 151-byte string literal not displayed */ // 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) GetMatchLabels ¶ added in v1.17.0
func (x *GameServerSelector) GetMatchLabels() map[string]string
func (*GameServerSelector) GetPlayers ¶ added in v1.17.0
func (x *GameServerSelector) GetPlayers() *PlayerSelector
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 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 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 PlayerSelector ¶ added in v1.17.0
type PlayerSelector struct { MinAvailable uint64 `protobuf:"varint,1,opt,name=minAvailable,proto3" json:"minAvailable,omitempty"` MaxAvailable uint64 `protobuf:"varint,2,opt,name=maxAvailable,proto3" json:"maxAvailable,omitempty"` // contains filtered or unexported fields }
PlayerSelector is filter for player capacity values. minAvailable should always be less or equal to maxAvailable.
func (*PlayerSelector) Descriptor
deprecated
added in
v1.17.0
func (*PlayerSelector) Descriptor() ([]byte, []int)
Deprecated: Use PlayerSelector.ProtoReflect.Descriptor instead.
func (*PlayerSelector) GetMaxAvailable ¶ added in v1.17.0
func (x *PlayerSelector) GetMaxAvailable() uint64
func (*PlayerSelector) GetMinAvailable ¶ added in v1.17.0
func (x *PlayerSelector) GetMinAvailable() uint64
func (*PlayerSelector) ProtoMessage ¶ added in v1.17.0
func (*PlayerSelector) ProtoMessage()
func (*PlayerSelector) ProtoReflect ¶ added in v1.29.0
func (x *PlayerSelector) ProtoReflect() protoreflect.Message
func (*PlayerSelector) Reset ¶ added in v1.17.0
func (x *PlayerSelector) Reset()
func (*PlayerSelector) String ¶ added in v1.17.0
func (x *PlayerSelector) String() string
type Priority ¶ added in v1.32.0
type Priority struct { PriorityType string `protobuf:"bytes,1,opt,name=priorityType,proto3" json:"priorityType,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` Order string `protobuf:"bytes,3,opt,name=order,proto3" json:"order,omitempty"` // contains filtered or unexported fields }
Priority is a sorting option for GameServers with Counters or Lists based on the count or number of items in a List. PriorityType: 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". Default is "Descending" so bigger count is preferred. "Ascending" would be smaller count is preferred.
func (*Priority) Descriptor
deprecated
added in
v1.32.0
func (*Priority) GetPriorityType ¶ added in v1.32.0
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 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 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.