Skip to content

serdardemir/Consul.Net

Repository files navigation

Consul.Net

Consul REST API wrapper for the .NET

Usage


To run a local consul server:

  • Open a command prompt and cd to the "consul" folder.
  • Run .\consul.exe agent -dev
IConsulConfig config = new ConsulConfig()
{
    ApiPath = "http://localhost:8500"
};

IConsulClient client = new ConsulClient(config);

ConsulResponse response = client.Get(Endpoints.Members).ResultAs<AgentMember[]>();

Key / Value Set

Todo todo = new Todo() { Description = "Sample Description", Title = "Sample Title" };

ConsulResponse response = client.Put($"{Endpoints.KV}{CacheKey}", todo);

Using with .NET Core and Mono

About

.Net client library for Consul

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages