Skip to content

LaunchController

LaunchController exposes launch validation, game start/stop, and running instance queries to the frontend. It stays limited to DTO conversion and feature invocation.

  • Methods: 6
  • Referenced types: 4

Methods

ForceStopInstance

ForceStopInstance terminates a running game or server process immediately.

Go

go
ForceStopInstance(id string) error

TypeScript

ts
ForceStopInstance(id: string): Promise<void>

Parameters

NameType
idstring

Example

ts
await ForceStopInstance("id")

Source

internal/transport/wails/launch_controller.go:119

GetRunningInstances

GetRunningInstances returns identifiers for instances with active game or server processes.

Go

go
GetRunningInstances() []string

TypeScript

ts
GetRunningInstances(): Promise<string[]>

Returns

Go typeTypeScript type
[]stringstring[]

Example

ts
const getRunningInstances = await GetRunningInstances()

Source

internal/transport/wails/launch_controller.go:128

LaunchInstance

LaunchInstance validates the instance, starts the game process, and returns after its play session is persisted; it does not wait for the process to exit.

Go

go
LaunchInstance(request LaunchRequest) (PlaySessionDTO, error)

TypeScript

ts
LaunchInstance(request: LaunchRequest): Promise<PlaySessionDTO>

Parameters

NameType
requestLaunchRequest

Returns

Go typeTypeScript type
PlaySessionDTOPlaySessionDTO

Errors

  • validation_error: launch validation reported blocking issues
  • instance_not_found: the requested instance does not exist
  • game_version_not_found: the instance game version is not installed
  • account_not_found: the selected account does not exist
  • client_settings_error: game credentials could not be prepared
  • process_start_failed: the game process could not be started
  • snapshot_in_progress: a snapshot is currently being taken
  • data_folder_busy: a data-folder relocation is in progress

Example

ts
const launchInstance = await LaunchInstance({ instanceId: "instance-id" })

Source

internal/transport/wails/launch_controller.go:77

LaunchServer

LaunchServer starts the dedicated server for an instance with the requested arguments.

Go

go
LaunchServer(request ServerLaunchRequest) (PlaySessionDTO, error)

TypeScript

ts
LaunchServer(request: ServerLaunchRequest): Promise<PlaySessionDTO>

Parameters

NameType
requestServerLaunchRequest

Returns

Go typeTypeScript type
PlaySessionDTOPlaySessionDTO

Example

ts
const launchServer = await LaunchServer({ instanceId: "instance-id", address: "" })

Source

internal/transport/wails/launch_controller.go:93

StopInstance

StopInstance requests a graceful stop of a running game or server process.

Go

go
StopInstance(id string) error

TypeScript

ts
StopInstance(id: string): Promise<void>

Parameters

NameType
idstring

Example

ts
await StopInstance("id")

Source

internal/transport/wails/launch_controller.go:110

ValidateLaunch

ValidateLaunch checks whether an instance can start and reports blocking problems.

Go

go
ValidateLaunch(request LaunchRequest) (LaunchValidationDTO, error)

TypeScript

ts
ValidateLaunch(request: LaunchRequest): Promise<LaunchValidationDTO>

Parameters

NameType
requestLaunchRequest

Returns

Go typeTypeScript type
LaunchValidationDTOLaunchValidationDTO

Example

ts
const validateLaunch = await ValidateLaunch({ instanceId: "instance-id" })

Source

internal/transport/wails/launch_controller.go:50