Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 583 Bytes

File metadata and controls

23 lines (18 loc) · 583 Bytes

ServiceDiscovery.Nomad

Simple service discovery for .NET Aspire and Hashicorp Nomad

Usage

Add package ServiceDiscovery.Nomad to your Aspire ServiceDefaults project.

dotnet add package ServiceDiscovery.Nomad

In your Aspire ServiceDefaults project, replace the following:

~~builder.Services.AddServiceDiscovery();~~

with

builder.Services.AddNomadServiceDiscovery();

and you're good to go.

How it works

ServiceDiscovery.Nomad uses the Nomad environment variables NOMAD_ADDR_* to connect to the correct service. Simple, right?