Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- func (c Client) AddLabelToGameServer(ctx context.Context, gameserver *v1.GameServer, key, value string) (*v1.GameServer, error)
- func (c Client) CreateFleet(ctx context.Context, namespace string, fleet *v1.Fleet) (*v1.Fleet, error)
- func (c Client) CreateFleetAutoscaler(ctx context.Context, namespace string, autoscaler *autoscaling.FleetAutoscaler) (*autoscaling.FleetAutoscaler, error)
- func (c Client) CreateGameServer(ctx context.Context, namespace string, gameserver *v1.GameServer) (*v1.GameServer, error)
- func (c Client) CreateGameServerAllocation(ctx context.Context, namespace string, ...) (*allocationv1.GameServerAllocation, error)
- func (c Client) DeleteFleet(ctx context.Context, namespace, name string) error
- func (c Client) DeleteFleetAutoscaler(ctx context.Context, namespace string, name string) error
- func (c Client) DeleteGameServer(ctx context.Context, namespace, name string) error
- func (c Client) GetFleet(namespace, name string) (*v1.Fleet, error)
- func (c Client) GetFleetAutoscaler(ctx context.Context, namespace string, name string) (*autoscaling.FleetAutoscaler, error)
- func (c Client) GetFleetsBySelectors(namespace string, labelSelectors *metav1.LabelSelector) (*v1.FleetList, error)
- func (c Client) GetGameServer(ctx context.Context, namespace, name string) (*agonesv1.GameServer, error)
- func (c Client) GetGameServerByName(ctx context.Context, namespace, name string) (*agonesv1.GameServer, error)
- func (c Client) GetGameServerLogs(ctx context.Context, baseClient *base.Client, namespace string, ...) (string, string, error)
- func (c Client) GetGameServers(ctx context.Context, namespace string, labelSelectors labels.Set) (*agonesv1.GameServerList, error)
- func (c Client) IsGameServerAvailable(ctx context.Context, namespace, name string) bool
- func (c Client) IsGameServerReady(ctx context.Context, namespace, name string) (*agonesv1.GameServer, bool)
Constants ¶
View Source
const ( DefaultGameServerContainerName = "gameserver" DefaultGameServerSidecarContainerName = "agones-gameserver-sidecar" DefaultGameServerPortName = "udp" DefaultGameServerPort = 7777 SimpleGameServerImage = "gcr.io/pixo-bootstrap/multiplayer/gameservers/simple-server:latest" DeletedGameServerLabel = "agones.dev/deleted" )
Variables ¶
View Source
var ( GameServerTolerations = []corev1.Toleration{ { Effect: "NoExecute", Key: "gameserver", Operator: "Equal", Value: "true", }, } SimpleGameServer = agonesv1.GameServer{ ObjectMeta: metav1.ObjectMeta{ GenerateName: "test-gameserver-", Labels: labels.Set{ "agones.dev/sdk-OrgID": "1", "agones.dev/sdk-ModuleID": "1", }, }, Spec: agonesv1.GameServerSpec{ Container: "simplegameserver", Ports: []agonesv1.GameServerPort{{ Name: DefaultGameServerPortName, ContainerPort: DefaultGameServerPort, Protocol: corev1.ProtocolUDP, PortPolicy: agonesv1.Dynamic, }}, Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ Tolerations: GameServerTolerations, Containers: []corev1.Container{ { Name: DefaultGameServerContainerName, Image: SimpleGameServerImage, ImagePullPolicy: corev1.PullAlways, Resources: corev1.ResourceRequirements{ Requests: corev1.ResourceList{}, }, }, }, }, }, }, } )
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (Client) AddLabelToGameServer ¶
func (c Client) AddLabelToGameServer(ctx context.Context, gameserver *v1.GameServer, key, value string) (*v1.GameServer, error)
func (Client) CreateFleet ¶
func (Client) CreateFleetAutoscaler ¶
func (c Client) CreateFleetAutoscaler(ctx context.Context, namespace string, autoscaler *autoscaling.FleetAutoscaler) (*autoscaling.FleetAutoscaler, error)
func (Client) CreateGameServer ¶
func (c Client) CreateGameServer(ctx context.Context, namespace string, gameserver *v1.GameServer) (*v1.GameServer, error)
func (Client) CreateGameServerAllocation ¶
func (c Client) CreateGameServerAllocation(ctx context.Context, namespace string, allocation *allocationv1.GameServerAllocation) (*allocationv1.GameServerAllocation, error)
func (Client) DeleteFleet ¶
func (Client) DeleteFleetAutoscaler ¶
func (Client) DeleteGameServer ¶
func (Client) GetFleetAutoscaler ¶
func (c Client) GetFleetAutoscaler(ctx context.Context, namespace string, name string) (*autoscaling.FleetAutoscaler, error)
func (Client) GetFleetsBySelectors ¶
func (Client) GetGameServer ¶
func (Client) GetGameServerByName ¶
func (Client) GetGameServerLogs ¶
func (Client) GetGameServers ¶
func (Client) IsGameServerAvailable ¶
func (Client) IsGameServerReady ¶
Click to show internal directories.
Click to hide internal directories.