OutWit.Communication.Client.HealthChecks
2.3.1
See the version list below for details.
dotnet add package OutWit.Communication.Client.HealthChecks --version 2.3.1
NuGet\Install-Package OutWit.Communication.Client.HealthChecks -Version 2.3.1
<PackageReference Include="OutWit.Communication.Client.HealthChecks" Version="2.3.1" />
<PackageVersion Include="OutWit.Communication.Client.HealthChecks" Version="2.3.1" />
<PackageReference Include="OutWit.Communication.Client.HealthChecks" />
paket add OutWit.Communication.Client.HealthChecks --version 2.3.1
#r "nuget: OutWit.Communication.Client.HealthChecks, 2.3.1"
#:package OutWit.Communication.Client.HealthChecks@2.3.1
#addin nuget:?package=OutWit.Communication.Client.HealthChecks&version=2.3.1
#tool nuget:?package=OutWit.Communication.Client.HealthChecks&version=2.3.1
OutWit.Communication.Client.HealthChecks
ASP.NET Core health checks integration for WitRPC client, providing health monitoring for WitRPC client connectivity.
Overview
OutWit.Communication.Client.HealthChecks provides health check implementations for monitoring WitRPC client connections. It integrates with the ASP.NET Core health checks framework, allowing you to monitor client connectivity, authorization status, and reconnection state.
Key features:
- Connection monitoring - Check if clients are connected and authorized
- State reporting - Reports connection state (Connected, Disconnected, Reconnecting, Failed)
- Rich health data - Returns detailed information about client status
- Easy integration - Works with standard ASP.NET Core health check endpoints
Installation
Install-Package OutWit.Communication.Client.HealthChecks
Usage
Basic Health Check Registration
Add a health check for a specific WitRPC client:
services.AddWitRpcClient("my-service", options =>
{
options.WithWebSocket("ws://localhost:5000");
options.WithJson();
options.WithAutoReconnect();
});
services.AddHealthChecks()
.AddWitRpcClient("my-service");
// Map health check endpoint
app.MapHealthChecks("/health");
Custom Health Check Name
Specify a custom name for the health check:
services.AddHealthChecks()
.AddWitRpcClient("my-service", name: "witrpc-connectivity");
Custom Failure Status
Specify the health status to report on failure:
services.AddHealthChecks()
.AddWitRpcClient("my-service",
failureStatus: HealthStatus.Degraded);
With Tags
Add tags for filtering health checks:
services.AddHealthChecks()
.AddWitRpcClient("my-service",
tags: new[] { "witrpc", "external" });
// Map filtered health checks
app.MapHealthChecks("/health/witrpc", new HealthCheckOptions
{
Predicate = check => check.Tags.Contains("witrpc")
});
Multiple Clients
Monitor multiple WitRPC clients:
services.AddWitRpcClient("service-a", options => { /* ... */ });
services.AddWitRpcClient("service-b", options => { /* ... */ });
services.AddHealthChecks()
.AddWitRpcClient("service-a")
.AddWitRpcClient("service-b");
Health Check Response
The health check returns the following data:
| Field | Description |
|---|---|
clientName |
Name of the client configuration |
connectionState |
Current state: Connected, Disconnected, Reconnecting, Failed |
isInitialized |
Whether the client has completed initialization |
isAuthorized |
Whether the client has completed authorization |
Health Status Mapping:
- Healthy - Client is connected and authorized
- Degraded - Client is reconnecting
- Unhealthy - Client is disconnected or reconnection failed
Example Response
{
"status": "Healthy",
"results": {
"witrpc-client-my-service": {
"status": "Healthy",
"description": "WitRPC client 'my-service' is connected and authorized.",
"data": {
"clientName": "my-service",
"connectionState": "Connected",
"isInitialized": true,
"isAuthorized": true
}
}
}
}
Further Documentation
For more about WitRPC and health monitoring, see the official documentation on witrpc.io.
License
Licensed under the Apache License, Version 2.0. See LICENSE.
Attribution (optional)
If you use OutWit.Communication.Client.HealthChecks in a product, a mention is appreciated (but not required), for example: "Powered by WitRPC (https://witrpc.io/)".
Trademark / Project name
"WitRPC" and the WitRPC logo are used to identify the official project by Dmitry Ratner.
You may:
- refer to the project name in a factual way (e.g., "built with WitRPC");
- use the name to indicate compatibility (e.g., "WitRPC-compatible").
You may not:
- use "WitRPC" as the name of a fork or a derived product in a way that implies it is the official project;
- use the WitRPC logo to promote forks or derived products without permission.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.2)
- OutWit.Communication.Client.DependencyInjection (>= 2.3.1)
-
net6.0
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 6.0.36)
- OutWit.Communication.Client.DependencyInjection (>= 2.3.1)
-
net7.0
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 7.0.20)
- OutWit.Communication.Client.DependencyInjection (>= 2.3.1)
-
net8.0
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.22)
- OutWit.Communication.Client.DependencyInjection (>= 2.3.1)
-
net9.0
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 9.0.11)
- OutWit.Communication.Client.DependencyInjection (>= 2.3.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.