@@ -217,7 +217,7 @@ func (c *Controller) creationHandler(review admv1beta1.AdmissionReview) (admv1be
217217
218218// Run the GameServer controller. Will block until stop is closed.
219219// Runs threadiness number workers to process the rate limited queue
220- func (c Controller ) Run (threadiness int , stop <- chan struct {}) error {
220+ func (c * Controller ) Run (threadiness int , stop <- chan struct {}) error {
221221 c .logger .Info ("Starting health check..." )
222222 go func () {
223223 if err := c .server .ListenAndServe (); err != nil {
@@ -490,9 +490,9 @@ func (c *Controller) syncGameServerRequestReadyState(gs *stablev1alpha1.GameServ
490490 if err != nil {
491491 return gs , errors .Wrapf (err , "error getting pod for GameServer %s" , gs .ObjectMeta .Name )
492492 }
493- addr , err := c .Address (pod )
493+ addr , err := c .address (pod )
494494 if err != nil {
495- return gs , errors .Wrapf (err , "error getting external Address for GameServer %s" , gs .ObjectMeta .Name )
495+ return gs , errors .Wrapf (err , "error getting external address for GameServer %s" , gs .ObjectMeta .Name )
496496 }
497497
498498 gsCopy := gs .DeepCopy ()
@@ -505,10 +505,10 @@ func (c *Controller) syncGameServerRequestReadyState(gs *stablev1alpha1.GameServ
505505
506506 gs , err = c .gameServerGetter .GameServers (gs .ObjectMeta .Namespace ).Update (gsCopy )
507507 if err != nil {
508- return gs , errors .Wrapf (err , "error setting Ready, Port and Address on GameServer %s Status" , gs .ObjectMeta .Name )
508+ return gs , errors .Wrapf (err , "error setting Ready, Port and address on GameServer %s Status" , gs .ObjectMeta .Name )
509509 }
510510
511- c .recorder .Event (gs , corev1 .EventTypeNormal , string (gs .Status .State ), "Address and Port populated" )
511+ c .recorder .Event (gs , corev1 .EventTypeNormal , string (gs .Status .State ), "address and Port populated" )
512512 return gs , nil
513513}
514514
@@ -530,7 +530,7 @@ func (c *Controller) syncGameServerShutdownState(gs *stablev1alpha1.GameServer)
530530}
531531
532532// moveToErrorState moves the GameServer to the error state
533- func (c Controller ) moveToErrorState (gs * stablev1alpha1.GameServer , msg string ) (* stablev1alpha1.GameServer , error ) {
533+ func (c * Controller ) moveToErrorState (gs * stablev1alpha1.GameServer , msg string ) (* stablev1alpha1.GameServer , error ) {
534534 copy := gs .DeepCopy ()
535535 copy .Status .State = stablev1alpha1 .Error
536536
@@ -580,11 +580,11 @@ func (c *Controller) listGameServerPods(gs *stablev1alpha1.GameServer) ([]*corev
580580 return result , nil
581581}
582582
583- // Address returns the IP that the given Pod is being run on
583+ // address returns the IP that the given Pod is being run on
584584// This should be the externalIP, but if the externalIP is
585585// not set, it will fall back to the internalIP with a warning.
586586// (basically because minikube only has an internalIP)
587- func (c Controller ) Address (pod * corev1.Pod ) (string , error ) {
587+ func (c * Controller ) address (pod * corev1.Pod ) (string , error ) {
588588 node , err := c .nodeLister .Get (pod .Spec .NodeName )
589589 if err != nil {
590590 return "" , errors .Wrapf (err , "error retrieving node %s for Pod %s" , node .ObjectMeta .Name , pod .ObjectMeta .Name )
@@ -604,12 +604,12 @@ func (c Controller) Address(pod *corev1.Pod) (string, error) {
604604 }
605605 }
606606
607- return "" , errors .Errorf ("Could not find an Address for Node: %s" , node .ObjectMeta .Name )
607+ return "" , errors .Errorf ("Could not find an address for Node: %s" , node .ObjectMeta .Name )
608608}
609609
610610// waitForEstablishedCRD blocks until CRD comes to an Established state.
611611// Has a deadline of 60 seconds for this to occur.
612- func (c Controller ) waitForEstablishedCRD () error {
612+ func (c * Controller ) waitForEstablishedCRD () error {
613613 return wait .PollImmediate (500 * time .Millisecond , 60 * time .Second , func () (done bool , err error ) {
614614 crd , err := c .crdGetter .Get ("gameservers.stable.agones.dev" , metav1.GetOptions {})
615615 if err != nil {
0 commit comments