Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsGameServerKind ¶
func IsGameServerKind(obj interface{}) (string, *agonesv1.GameServer, error)
IsGameServerKind checks if the passed object is of type GameServer and returns the resource key (namespace/name), the GameServer reference. An error is returned if neither a key can be extracted from the object nor the object can be casted to a GameServer type.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewGameServerController ¶
func NewGameServerController(logger *logrus.Entry, clientSet versioned.Interface) (*Controller, error)
NewGameServerController returns a new Controller with informer and lister set. It requires a not nil Agones clientset.
func (*Controller) EventHandlerGameServerAdd ¶
func (c *Controller) EventHandlerGameServerAdd(obj interface{}) error
EventHandlerGameServerAdd handles events triggered in two occasions: 1. When the controller is first run and has to sync with the cache 2. When a new resource is added via Kubernetes API requests: kubectl, client-go, http requests, etc.
func (*Controller) EventHandlerGameServerDelete ¶
func (c *Controller) EventHandlerGameServerDelete(obj interface{}) error
EventHandlerGameServerDelete handles events triggered due to a resource being deleted.
func (*Controller) EventHandlerGameServerUpdate ¶
func (c *Controller) EventHandlerGameServerUpdate(oldObj, newObj interface{}) error
EventHandlerGameServerUpdate handles events triggered due to a resource being updated. That includes chances caused by either the Kubernetes controller manager or any other external actor modifying the resource. I.e.: Another GameServer controller.
func (*Controller) Run ¶
func (c *Controller) Run(stop <-chan struct{})
Run starts the GameServer controller and attach event handlers which will receive notifications from the informer.