Interface IGameyeApiClient

Namespace
Unity.Multiplayer.Core

The slice of Gameye's API GameyeMatchAllocator needs. The only seam between the allocator and the network, so NUnit mocks it directly instead of faking HTTP responses.

public interface IGameyeApiClient

Methods

GetSessionAsync(string, CancellationToken)

The session's current status and port mapping.

Task<GameyeSession> GetSessionAsync(string sessionId, CancellationToken cancellationToken = default)

Parameters

sessionId string
cancellationToken CancellationToken

Returns

Task<GameyeSession>

RegisterImageAsync(GameyeImageRegistration, CancellationToken)

Registers (or updates) the image Gameye pulls sessions from. Idempotent: call it again whenever mp-host pushes a new image under the same name.

Task RegisterImageAsync(GameyeImageRegistration registration, CancellationToken cancellationToken = default)

Parameters

registration GameyeImageRegistration
cancellationToken CancellationToken

Returns

Task

StartSessionAsync(GameyeStartSessionRequest, CancellationToken)

Starts a session for one match.

Task<GameyeSession> StartSessionAsync(GameyeStartSessionRequest request, CancellationToken cancellationToken = default)

Parameters

request GameyeStartSessionRequest
cancellationToken CancellationToken

Returns

Task<GameyeSession>

StopSessionAsync(string, CancellationToken)

Stops a session. Safe to call on one already gone.

Task StopSessionAsync(string sessionId, CancellationToken cancellationToken = default)

Parameters

sessionId string
cancellationToken CancellationToken

Returns

Task