Documentation ¶
Index ¶
Constants ¶
View Source
const (
StateReason = "GsStateChanged"
)
View Source
const (
TimeFormat = "2006-01-02 15:04:05"
)
Variables ¶
View Source
var ( NetworkTotalWaitTime = util.GetNetworkTotalWaitTime() NetworkIntervalTime = util.GetNetworkIntervalTime() )
Functions ¶
Types ¶
type Control ¶
type Control interface { // SyncGsToPod compares the pod with GameServer, and decide whether to update the pod based on the results. // When the fields of the pod is different from that of GameServer, pod will be updated. SyncGsToPod() error // SyncPodToGs compares the GameServer with pod, and update the GameServer. SyncPodToGs(*gameKruiseV1alpha1.GameServerSet) error // WaitOrNot compare the current game server network status to decide whether to re-queue. WaitOrNot() bool }
func NewGameServerManager ¶
func NewGameServerManager(gs *gameKruiseV1alpha1.GameServer, pod *corev1.Pod, c client.Client, recorder record.EventRecorder) Control
type GameServerManager ¶
type GameServerManager struct {
// contains filtered or unexported fields
}
func (GameServerManager) SyncGsToPod ¶
func (manager GameServerManager) SyncGsToPod() error
func (GameServerManager) SyncPodToGs ¶
func (manager GameServerManager) SyncPodToGs(gss *gameKruiseV1alpha1.GameServerSet) error
func (GameServerManager) WaitOrNot ¶ added in v0.2.0
func (manager GameServerManager) WaitOrNot() bool
type GameServerReconciler ¶
type GameServerReconciler struct { client.Client Scheme *runtime.Scheme // contains filtered or unexported fields }
GameServerReconciler reconciles a GameServer object
func (*GameServerReconciler) Reconcile ¶
func (r *GameServerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the GameServer object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.1/pkg/reconcile
func (*GameServerReconciler) SetupWithManager ¶
func (r *GameServerReconciler) SetupWithManager(mgr ctrl.Manager) (c controller.Controller, err error)
SetupWithManager sets up the controller with the Manager.
Click to show internal directories.
Click to hide internal directories.