game-common / pragma.loadsimulator /

Package pragma.loadsimulator #

Types #

NameSummary

ClientStackKind

enum ClientStackKind : Enum<ClientStackKind>

Which client stack the load simulator runs over. NEW is the default; OLD (OldLoadSimClientFactory) exists for compat testing.

ClientWrapper

class ClientWrapper(playerId: Fixed128, socialId: Fixed128, displayName: PragmaDisplayName, providerAccountId: String, gameConnection: LoadSimConnection, socialConnection: LoadSimConnection, telemetrySender: TelemetrySender<TelemetryRpc.TelemetryEvent>, delayer: Delayer, disconnectClient: suspend () -> Unit)

Loadsim wrapper over a connected PlayerClient.

LoadSimClientFactory

interface LoadSimClientFactory

Produces connected load-sim clients. Players are ClientWrappers, the operator an OperatorWrapper and the partner a PartnerWrapper.

LoadSimRpcConnection

class LoadSimRpcConnection(connection: <ERROR CLASS>) : LoadSimConnection

Adapts the new pragma.clientsRpcConnection, which already speaks RpcResult and predicate waits.

NewLoadSimClientFactory

class NewLoadSimClientFactory(factory: <ERROR CLASS>, delayer: Delayer) : LoadSimClientFactory

The new pragma.clients stack: PragmaClientFactory builds the clients; this wraps them for the loadsim.

NotificationTypes

internal object NotificationTypes

Resolves the notification names steps and notificationsToPersist config use — Kotlin qualified names such as pragma.party.PartyRpc.PartyDetailsV1Notification — to notification classes.

OldLoadSimClientFactory

class OldLoadSimClientFactory(config: LoadSimulatorConfig, backgroundManager: BackgroundManager, delayer: Delayer) : LoadSimClientFactory

The old pragma.client stack.

OldStackConnection

class OldStackConnection(connection: BackendConnection) : LoadSimConnection

Adapts the old pragma.clientBackendConnection onto the same RpcResult surface.

OldStackKeepAlive

internal class OldStackKeepAlive(client: PragmaClient, child: BackgroundManager, heartbeatMillis: Long, stopTimeoutMillis: Long = STOP_TIMEOUT_MILLIS)

Keep-alive and watchdog for a client on the old pragma.client stack, which owns neither. Mirrors the new stack’s ClientSession.

OperatorWrapper

class OperatorWrapper(providerAccountId: String, gameConnection: LoadSimConnection, socialConnection: LoadSimConnection, telemetrySender: TelemetrySender<TelemetryRpc.SourcedEvent>, delayer: Delayer, disconnectClient: suspend () -> Unit)

A loadsim operator client.

PartnerWrapper

class PartnerWrapper(gameConnection: LoadSimConnection, socialConnection: LoadSimConnection, telemetrySender: TelemetrySender<TelemetryRpc.SourcedEvent>, disconnectClient: suspend () -> Unit)

A loadsim partner client (a game server): pre-provisioned tokens, game + social rpc clients and tracked telemetryService.

RpcClient

open class RpcClient(connection: LoadSimConnection, delayer: Delayer, clientId: String, backend: String)

Loadsim-facing view of one backend connection.

TelemetrySender

typealias TelemetrySender<Event> = suspend (<ERROR CLASS>, events: List<Event>) -> <ERROR CLASS><Unit>

Sends one batch of telemetry events for a destination: a new-stack client’s telemetryService::sendEvents, or the old stack’s equivalent. The seam that lets the same TrackedTelemetryService run over either client stack.

TrackedTelemetryService

class TrackedTelemetryService<Event>(sender: TelemetrySender<Event>, delayer: Delayer, clientId: String, requestClass: KClass<out GeneratedMessage>, responseClass: KClass<out GeneratedMessage>)

The loadsim’s tracked view of a client’s telemetry service.