Interface IEdgegapApiClient
- Namespace
- Unity.Multiplayer.Core
The slice of Edgegap's v1 API EdgegapMatchAllocator needs. The only seam between the allocator and the network, so NUnit mocks it directly instead of faking HTTP responses.
public interface IEdgegapApiClient
Methods
DeployAsync(EdgegapDeployRequest, CancellationToken)
Requests a deployment of an app version, for one match.
Task<EdgegapDeployment> DeployAsync(EdgegapDeployRequest request, CancellationToken cancellationToken = default)
Parameters
requestEdgegapDeployRequestcancellationTokenCancellationToken
Returns
EnsureAppVersionAsync(EdgegapAppVersionRequest, CancellationToken)
Creates or updates the app version that points at a GHCR image, so a later DeployAsync(EdgegapDeployRequest, CancellationToken) has something to deploy. Idempotent: calling it again with the same version name and image updates that version in place rather than creating a new one.
Task EnsureAppVersionAsync(EdgegapAppVersionRequest request, CancellationToken cancellationToken = default)
Parameters
requestEdgegapAppVersionRequestcancellationTokenCancellationToken
Returns
GetDeploymentAsync(string, CancellationToken)
The deployment's current status and port mapping.
Task<EdgegapDeployment> GetDeploymentAsync(string requestId, CancellationToken cancellationToken = default)
Parameters
requestIdstringcancellationTokenCancellationToken
Returns
StopDeploymentAsync(string, CancellationToken)
Stops and tears down a deployment. Safe to call on one already gone.
Task StopDeploymentAsync(string requestId, CancellationToken cancellationToken = default)
Parameters
requestIdstringcancellationTokenCancellationToken