Anarchy.Toolkit.Hosting.Workers
1.0.3
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Anarchy.Toolkit.Hosting.Workers --version 1.0.3
NuGet\Install-Package Anarchy.Toolkit.Hosting.Workers -Version 1.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Anarchy.Toolkit.Hosting.Workers" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Anarchy.Toolkit.Hosting.Workers" Version="1.0.3" />
<PackageReference Include="Anarchy.Toolkit.Hosting.Workers" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Anarchy.Toolkit.Hosting.Workers --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Anarchy.Toolkit.Hosting.Workers, 1.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Anarchy.Toolkit.Hosting.Workers@1.0.3
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Anarchy.Toolkit.Hosting.Workers&version=1.0.3
#tool nuget:?package=Anarchy.Toolkit.Hosting.Workers&version=1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Anarchy.Toolkit.Hosting.Workers
Background-worker primitives and a self-hosted health API for worker processes.
dotnet add package Anarchy.Toolkit.Hosting.Workers
- Derive from
WorkerBase,MonitoredWorkerBaseorResilientWorkerBase;HeartbeatWorkerprovides a heartbeat. - Register the health worker with
AddServiceHealthCheckWorker(assembly)to serve/health/instance,/health/servicesand/health/status. - Supply an
IReadOnlyCollection<IServiceHealthReport>for service checks; the services endpoint returns HTTP 500 when a check fails.
When to use it
Choose this package for a long-running process that needs hosted workers, operational heartbeat or HTTP health endpoints without building a full REST API. It complements Hosting, which provides the application host and entry-point conventions.
How to use it
- Implement a worker using the base that matches the required monitoring or resilience behavior, and register it with the host's
IServiceCollectionas a hosted service. Register anObserverfor instrumented workers. - If health endpoints are required, call
services.AddServiceHealthCheckWorker(typeof(YourWorker).Assembly)from startup. Register settings implementingIWorkerHealthCheckAppSettings, including the health service port, and make the listener reachable only as appropriate for your deployment. - Supply the
IReadOnlyCollection<IServiceHealthReport>used by the endpoint, or use a provider's health-report registration. Without reports, the package installs an empty collection. Embed build metadata in the supplied assembly if it should appear in status output.
The sample worker startup demonstrates registering a heartbeat and a custom hosted worker.
See the worker sample and toolkit overview.
Releases
1.0.3
- build: migrate local automation to NUKE
1.0.2
- docs: expand package guides and release histories
- chore(deps): update AWS, Polly, and xUnit packages
1.0.1
- Added a package-specific NuGet README.
1.0.0
- Introduced monitored and resilient worker bases, heartbeat and health checks, a self-hosted health API and build metadata readers.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Amazon.Extensions.Configuration.SystemsManager (>= 7.1.1)
- Anarchy.Toolkit.Configuration (>= 1.0.3)
- Anarchy.Toolkit.Core (>= 1.0.3)
- Anarchy.Toolkit.Core.Health (>= 1.0.3)
- Anarchy.Toolkit.Core.Observability (>= 1.0.3)
- AWSSDK.Core (>= 4.0.102.19)
- AWSSDK.Extensions.NETCore.Setup (>= 4.0.102.10)
- AWSSDK.KeyManagementService (>= 4.0.101.4)
- AWSSDK.SecretsManager (>= 4.0.100.25)
- Humanizer (>= 3.0.10)
- Microsoft.Extensions.Hosting.Systemd (>= 10.0.14)
- Microsoft.Identity.Client (>= 4.92.0)
- Newtonsoft.Json (>= 13.0.4)
- Polly.Core (>= 8.9.1)
- Serilog (>= 4.4.0)
- Serilog.Sinks.Console (>= 6.1.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release.