Documentation
¶
Index ¶
- type DeployOptions
- type Deployer
- func (d *Deployer) CreateContainerGroupDefinition(ctx context.Context) (string, error)
- func (d *Deployer) CreateFleet(ctx context.Context, cgdARN string) (*FleetStatus, error)
- func (d *Deployer) CreateGameSession(ctx context.Context, fleetID string, maxPlayers int) (*deploy.SessionInfo, error)
- func (d *Deployer) DescribeGameSession(ctx context.Context, sessionID string) (string, error)
- func (d *Deployer) Destroy(ctx context.Context) error
- func (d *Deployer) GetFleetStatus(ctx context.Context) (*FleetStatus, error)
- type FleetStatus
- type TargetAdapter
- func (a *TargetAdapter) Capabilities() deploy.Capabilities
- func (a *TargetAdapter) CreateSession(ctx context.Context, maxPlayers int) (*deploy.SessionInfo, error)
- func (a *TargetAdapter) Deploy(ctx context.Context, input deploy.DeployInput) (*deploy.DeployResult, error)
- func (a *TargetAdapter) Deployer() *Deployer
- func (a *TargetAdapter) DescribeSession(ctx context.Context, sessionID string) (string, error)
- func (a *TargetAdapter) Destroy(ctx context.Context) error
- func (a *TargetAdapter) Name() string
- func (a *TargetAdapter) Status(ctx context.Context) (*deploy.DeployStatus, error)
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 ¶
CreateContainerGroupDefinition creates the container group definition in GameLift.
func (*Deployer) CreateFleet ¶
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 ¶
DescribeGameSession returns the current status of a game session.
func (*Deployer) Destroy ¶
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 (a *TargetAdapter) Deploy(ctx context.Context, input deploy.DeployInput) (*deploy.DeployResult, error)
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 ¶
DescribeSession implements deploy.SessionManager.
func (*TargetAdapter) Name ¶
func (a *TargetAdapter) Name() string
func (*TargetAdapter) Status ¶
func (a *TargetAdapter) Status(ctx context.Context) (*deploy.DeployStatus, error)