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
ForceStopInstance(id string) errorTypeScript
ForceStopInstance(id: string): Promise<void>Parameters
| Name | Type |
|---|---|
id | string |
Example
await ForceStopInstance("id")Source
internal/transport/wails/launch_controller.go:119
GetRunningInstances
GetRunningInstances returns identifiers for instances with active game or server processes.
Go
GetRunningInstances() []stringTypeScript
GetRunningInstances(): Promise<string[]>Returns
| Go type | TypeScript type |
|---|---|
[]string | string[] |
Example
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
LaunchInstance(request LaunchRequest) (PlaySessionDTO, error)TypeScript
LaunchInstance(request: LaunchRequest): Promise<PlaySessionDTO>Parameters
| Name | Type |
|---|---|
request | LaunchRequest |
Returns
| Go type | TypeScript type |
|---|---|
PlaySessionDTO | PlaySessionDTO |
Errors
validation_error: launch validation reported blocking issuesinstance_not_found: the requested instance does not existgame_version_not_found: the instance game version is not installedaccount_not_found: the selected account does not existclient_settings_error: game credentials could not be preparedprocess_start_failed: the game process could not be startedsnapshot_in_progress: a snapshot is currently being takendata_folder_busy: a data-folder relocation is in progress
Example
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
LaunchServer(request ServerLaunchRequest) (PlaySessionDTO, error)TypeScript
LaunchServer(request: ServerLaunchRequest): Promise<PlaySessionDTO>Parameters
| Name | Type |
|---|---|
request | ServerLaunchRequest |
Returns
| Go type | TypeScript type |
|---|---|
PlaySessionDTO | PlaySessionDTO |
Example
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
StopInstance(id string) errorTypeScript
StopInstance(id: string): Promise<void>Parameters
| Name | Type |
|---|---|
id | string |
Example
await StopInstance("id")Source
internal/transport/wails/launch_controller.go:110
ValidateLaunch
ValidateLaunch checks whether an instance can start and reports blocking problems.
Go
ValidateLaunch(request LaunchRequest) (LaunchValidationDTO, error)TypeScript
ValidateLaunch(request: LaunchRequest): Promise<LaunchValidationDTO>Parameters
| Name | Type |
|---|---|
request | LaunchRequest |
Returns
| Go type | TypeScript type |
|---|---|
LaunchValidationDTO | LaunchValidationDTO |
Example
const validateLaunch = await ValidateLaunch({ instanceId: "instance-id" })Source
internal/transport/wails/launch_controller.go:50