Skip to main content

ResQ.Clients

InfrastructureApiClient Class

HTTP client for infrastructure-api (Rust/Axum) service. Provides methods to upload evidence, record blockchain events, and manage incidents. Inherits resilience patterns from BaseServiceClient.
public class InfrastructureApiClient : ResQ.Clients.BaseServiceClient
Inheritance System.ObjectBaseServiceClient → InfrastructureApiClient
Methods
AuthenticateAsync(string, string, CancellationToken)Authenticates with infrastructure-api to get a JWT token. Sets the Authorization header for subsequent requests.
CreateIncidentAsync(CreateIncidentRequest, CancellationToken)Creates an incident record. Uses timeout and circuit-breaker handling without replaying the mutation on failure.
GetHealthAsync(CancellationToken)Gets infrastructure-api health status. Includes retry logic for transient read failures.
RecordEventAsync(BlockchainEventRequest, CancellationToken)Records a blockchain event via infrastructure-api Neo N3 adapter. Uses timeout and circuit-breaker handling without replaying the mutation on failure.
UploadImageAsync(byte[], string, CancellationToken)Uploads an image to IPFS via infrastructure-api. Uses timeout and circuit-breaker handling without replaying the upload on failure.