# Functions
GetNodeDetails returns the Public IP of the node and the node age in days if the Node does not have a Public IP, method returns the internal one.
IsNodeReadyAndSchedulable returns true if the node is ready and schedulable.
No description provided by the author
NewGameServerBuildReconciler returns a pointer to a new GameServerBuildReconciler.
NewGameServerExpectations returns a pointer to a new GameServerExpectations struct.
NewGameServerForGameServerBuild creates a GameServer for a GameServerBuild.
NewGameServerReconciler returns a pointer to a new GameServerReconciler.
NewGameServersPerBuildQueue returns a new priority queue for a single GameServerBuild.
NewGameServersQueue returns a new GameServersQueue.
NewPodForGameServer returns a Kubernetes Pod struct for a specified GameServer Pod has the same name as the GameServer It also sets a label called "GameServer" with the value of the corresponding GameServer resource.
NewPortRegistry initializes the map[port]counter that holds the port registry The way that this works is the following: We keep a map (HostPortsUsage) of all the port numbers every time a new port is requested, we check if the counter for this port is less than the number of Nodes if it is, we increase it by one.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
AllocateArgs contains information necessary to allocate a GameServer.
AllocationApiServer is a helper struct that implements manager.Runnable interface so it can be added to our Manager.
GameServerBuildReconciler reconciles a GameServerBuild object.
No description provided by the author
GameServerForQueue is a helper struct that encapsulates all the details we need from a GameServer object in order to store it on the queue.
GameServerQueueForBuild encapsulates a queue of GameServerForQueue for a specific GameServerBuild also contains a map of all the GameServers for that GameServerBuild.
GameServerReconciler reconciles a GameServer object.
GameServersQueue encapsulates a map of GameServersPerBuildHeaps essentially a set of PriorityQueues, one for each GameServerBuild.
Simple async map implementation using a mutex used to manage the expected GameServer creations and deletions.
PortRegistry implements a custom map for the port registry.
RequestMultiplayerServerResponse contains details that are returned on a successful GameServer allocation call.
# Type aliases
ByState is a slice of GameServers.
GameServerQueue implements a PriorityQueue for GameServer objects GameServers are sorted in the queue in ascending order based on the NodeAge field this queue is used by the allocation algorithm, to prioritize allocations on the Nodes that are newer based on https://pkg.go.dev/container/heap.