gamelift

package
v0.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeployOptions

type DeployOptions struct {
	// Region is the AWS region.
	Region string
	// ImageURI is the ECR image URI.
	ImageURI string
	// FleetName is the GameLift fleet name.
	FleetName string
	// InstanceType is the EC2 instance type.
	InstanceType string
	// ContainerGroupName is the container group definition name.
	ContainerGroupName string
	// ServerPort is the game server port.
	ServerPort int
	// ServerSDKVersion is the GameLift Server SDK version.
	ServerSDKVersion string
	// Tags are applied to all AWS resources created by this deployer.
	Tags map[string]string
}

DeployOptions configures the GameLift deployment.

type Deployer

type Deployer struct {
	// contains filtered or unexported fields
}

Deployer handles GameLift container fleet deployment.

func NewDeployer

func NewDeployer(opts DeployOptions, awsCfg aws.Config) *Deployer

NewDeployer creates a new GameLift deployer using the provided AWS config.

func (*Deployer) CreateContainerGroupDefinition

func (d *Deployer) CreateContainerGroupDefinition(ctx context.Context) (string, error)

CreateContainerGroupDefinition creates the container group definition in GameLift.

func (*Deployer) CreateFleet

func (d *Deployer) CreateFleet(ctx context.Context, cgdARN string) (*FleetStatus, error)

CreateFleet creates a new GameLift container fleet.

func (*Deployer) CreateGameSession

func (d *Deployer) CreateGameSession(ctx context.Context, fleetID string, maxPlayers int) (*deploy.SessionInfo, error)

CreateGameSession creates a test game session on the fleet.

func (*Deployer) DescribeGameSession

func (d *Deployer) DescribeGameSession(ctx context.Context, sessionID string) (string, error)

DescribeGameSession returns the current status of a game session.

func (*Deployer) Destroy

func (d *Deployer) Destroy(ctx context.Context) error

Destroy tears down all Ludus-managed AWS resources in reverse order: fleet → container group definition → IAM role.

func (*Deployer) GetFleetStatus

func (d *Deployer) GetFleetStatus(ctx context.Context) (*FleetStatus, error)

GetFleetStatus returns the current status of the deployed fleet.

type FleetStatus

type FleetStatus struct {
	FleetID              string `json:"fleetId"`
	FleetName            string `json:"fleetName"`
	Status               string `json:"status"`
	InstanceType         string `json:"instanceType"`
	ContainerGroupDefARN string `json:"containerGroupDefArn"`
}

FleetStatus represents the current state of a GameLift fleet.

type TargetAdapter

type TargetAdapter struct {
	// contains filtered or unexported fields
}

TargetAdapter wraps a GameLift Deployer to implement deploy.Target and deploy.SessionManager.

func NewTargetAdapter

func NewTargetAdapter(d *Deployer) *TargetAdapter

NewTargetAdapter creates a TargetAdapter wrapping the given Deployer.

func (*TargetAdapter) Capabilities

func (a *TargetAdapter) Capabilities() deploy.Capabilities

func (*TargetAdapter) CreateSession

func (a *TargetAdapter) CreateSession(ctx context.Context, maxPlayers int) (*deploy.SessionInfo, error)

CreateSession implements deploy.SessionManager.

func (*TargetAdapter) Deploy

func (*TargetAdapter) Deployer

func (a *TargetAdapter) Deployer() *Deployer

Deployer returns the underlying GameLift Deployer for direct access by GameLift-specific commands (fleet, session).

func (*TargetAdapter) DescribeSession

func (a *TargetAdapter) DescribeSession(ctx context.Context, sessionID string) (string, error)

DescribeSession implements deploy.SessionManager.

func (*TargetAdapter) Destroy

func (a *TargetAdapter) Destroy(ctx context.Context) error

func (*TargetAdapter) Name

func (a *TargetAdapter) Name() string

func (*TargetAdapter) Status

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL