metalTools.ServiceDiscovery.Hosting
26.10.11.1
dotnet add package metalTools.ServiceDiscovery.Hosting --version 26.10.11.1
NuGet\Install-Package metalTools.ServiceDiscovery.Hosting -Version 26.10.11.1
<PackageReference Include="metalTools.ServiceDiscovery.Hosting" Version="26.10.11.1" />
<PackageVersion Include="metalTools.ServiceDiscovery.Hosting" Version="26.10.11.1" />
<PackageReference Include="metalTools.ServiceDiscovery.Hosting" />
paket add metalTools.ServiceDiscovery.Hosting --version 26.10.11.1
#r "nuget: metalTools.ServiceDiscovery.Hosting, 26.10.11.1"
#:package metalTools.ServiceDiscovery.Hosting@26.10.11.1
#addin nuget:?package=metalTools.ServiceDiscovery.Hosting&version=26.10.11.1
#tool nuget:?package=metalTools.ServiceDiscovery.Hosting&version=26.10.11.1
metalTools.ServiceDiscovery.Hosting
Optional .NET 10 Generic Host integration for the TCP discovery listener and endpoint advertisements. Core metalTools.ServiceDiscovery clients and leases remain independent of hosting dependencies.
Use builder.Services.AddDiscoveryHost(...) to start the listener before background workers run, observe listener/expiry failures, and stop it during graceful shutdown. Bind DiscoveryHostOptions from the host's Discovery configuration section. Relative table paths resolve against the host content root; deployed services should use an absolute writable data path. Default storage uses the service account's local application data folder.
Use builder.Services.AddDiscoveryRegistration(services => serviceDescription, options => ...) to advertise an application endpoint, renew it, retry a registry outage, and attempt bounded unregister during shutdown. The descriptor factory runs when the registration background worker begins; advertise only an endpoint already listening. An application's asynchronous background startup is not proof of readiness: coordinate readiness explicitly before exposing its endpoint. Defaults are localhost:51220, a 15-second renewal/retry interval, and a three-second unregister timeout. Registry lifetime must exceed the heartbeat interval. Configure these options at registration time.
Register the listener/application service before its advertisement. The default host stops services in reverse registration order, so an advertisement can unregister before its registry/listener stops. Do not enable concurrent startup/shutdown without explicitly coordinating readiness and unregister ordering.
The host adapter does not launch registry processes automatically. Standalone EnsureRunningAsync and KeepAliveAsync APIs remain available. Invalid descriptions/configuration fail the worker; network outages are logged and retried. An unreachable registry on shutdown is handled by expiry.
DiscoveryHost moved from the executable assembly into this package, retaining its namespace and standalone Create(string[]), StartAsync, and StopAsync APIs. Consumers referencing its old executable assembly should rebuild against this package. DiscoveryHost.Completion exposes worker faults. Always stop/await before disposal.
Automatic local startup
Queries and registrations can reuse or start the independent local DiscoveryHost with WithAutomaticStartup(). Host-managed registration enables this by default. Add metalTools.DiscoveryHost to the executable application to deploy the host into its discovery folder. Remote registries are never replaced locally. See automatic discovery for settings, recovery, deployment, and service ownership.
| 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. |
-
net10.0
- metalTools.ServiceDiscovery (>= 26.10.11.1)
- Microsoft.Extensions.Hosting (>= 10.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 26.10.11.1 | 175 | 10/11/2026 |
| 26.10.10.1232 | 111 | 10/10/2026 |