game-common / pragma.fleet / FleetPlugin / add /

add #

abstract suspend fun add(serverPool: ServerPool, allocations: List<GameServerAllocation>)

Allocate additional game servers for a specific server pool. The number of game servers to allocate is calculated using the values configured in the ServerPoolManagementPolicyConfig configuration block associated with the supplied server pool, identified by ServerPool.managementPolicyId. When allocating game servers, include the server id and ServerPool.serverPoolId assigned to that server in the allocation payload.

Used by

  • FleetService: Executed when the current available capacity cannot fulfill a request to create a game instance.

Parameters #

serverPool

The server pool used for allocating.

allocations

The list of game servers to allocate. Contains server id and connection tokens.