Documentation
¶
Overview ¶
Package gameserverallocations handles management of allocating Ready GameServers via selectors
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNoGameServerReady is returned when there are no Ready GameServers // available ErrNoGameServerReady = errors.New("Could not find a Ready GameServer") )
Functions ¶
This section is empty.
Types ¶
type AllocationCounter ¶
type AllocationCounter struct {
// contains filtered or unexported fields
}
AllocationCounter counts how many Allocated and Ready GameServers currently exist on each node. This is useful for scheduling allocations on the right Nodes.
func NewAllocationCounter ¶
func NewAllocationCounter( kubeInformerFactory informers.SharedInformerFactory, agonesInformerFactory externalversions.SharedInformerFactory) *AllocationCounter
NewAllocationCounter returns a new AllocationCounter
func (*AllocationCounter) Counts ¶
func (ac *AllocationCounter) Counts() map[string]NodeCount
Counts returns the NodeCount map in a thread safe way
func (*AllocationCounter) Run ¶
func (ac *AllocationCounter) Run(stop <-chan struct{}) error
Run sets up the current state GameServer counts across nodes
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller is a the GameServerAllocation controller
func NewController ¶
func NewController(wh *webhooks.WebHook, health healthcheck.Handler, allocationMutex *sync.Mutex, kubeClient kubernetes.Interface, kubeInformerFactory informers.SharedInformerFactory, extClient extclientset.Interface, agonesClient versioned.Interface, agonesInformerFactory externalversions.SharedInformerFactory) *Controller
NewController returns a controller for a GameServerAllocation
func (*Controller) Run ¶
func (c *Controller) Run(workers int, stop <-chan struct{}) error
Run runs this controller. Will block until stop is closed. Runs threadiness number workers to process the rate limited queue Probably only needs 1 worker, as its just deleting unallocated GameServerAllocations