{"id":21528451,"url":"https://github.com/hellokitty/consul.net","last_synced_at":"2025-03-17T18:45:20.777Z","repository":{"id":84548068,"uuid":"130866393","full_name":"HelloKitty/Consul.NET","owner":"HelloKitty","description":".NET C# API client for Consul (http://www.consul.io/)","archived":false,"fork":false,"pushed_at":"2018-04-25T12:31:56.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-24T22:48:41.125Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HelloKitty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-24T14:23:36.000Z","updated_at":"2018-05-27T12:36:29.000Z","dependencies_parsed_at":"2023-04-21T17:17:46.434Z","dependency_job_id":null,"html_url":"https://github.com/HelloKitty/Consul.NET","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelloKitty%2FConsul.NET","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelloKitty%2FConsul.NET/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelloKitty%2FConsul.NET/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelloKitty%2FConsul.NET/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HelloKitty","download_url":"https://codeload.github.com/HelloKitty/Consul.NET/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244091982,"owners_count":20396705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T01:53:20.932Z","updated_at":"2025-03-17T18:45:20.771Z","avatar_url":"https://github.com/HelloKitty.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Consul.NET\n\n.NET C# API client for Consul (http://www.consul.io/)\n\n* Consul API: [v1.0.7](https://github.com/hashicorp/consul/tree/v1.0.7/api)\n* .NET: \u003e= 4.5 - .NETStandard \u003e= 1.4\n\nConsul.NET is an implementation of the Consul API for .NET. It is built on top of [TypeSafe.Http.Net](https://github.com/HelloKitty/TypeSafe.Http.Net) which is a typesafe automatic HTTP/REST client library based on Refit/Retrofit. This means that the Consul API implementation in this library provides a rich set of service interfaces with strongly typed JSON models where possible. Supports task-based async service calls and multiple HttpClient implementations are possible meaning if you or your company has their own HttpClient that must be used it can be implemented simply with [TypeSafe.Http.Net](https://github.com/HelloKitty/TypeSafe.Http.Net).\n\n## Features\n\nTODO\n\n## Getting Started\n\n1. Reference NuGet [Consul.Net.API](TODO) for projects that need to reference IConsul\\\u003cT\\\u003e or that require the Consul service interfaces as dependencies.\n\n2. Reference NuGet for client implementation. (Ex. [Consul.Net.Client.DotNetHttpClient](TODO))\n\n3. Create a IConsul\\\u003cT\\\u003e client where T is the service interface you're interested in. (Ex IConsul\\\u003cIConsulCatalogServiceHttpApiService\\\u003e) **see examples**\n\n4. Make service calls with the client or register the Service field from IConsul\u003c\\T\\\u003e with your IoC/DI container.\n\n## Examples\n\nThese examples assumes you're already running Consul and are already familiar with it. See the official [Consul](https://www.consul.io/intro/getting-started/install.html) guide on getting started if you're not.\n\nThese examples will also assume you're using the [Consul.Net.Client.DotNetHttpClient](TODO) package.\n\nYou can reuse the created client. You do not need to create one per service call. Though the examples will show this behavior so that they\nare runnable.\n\n\n#### Querying Consul Catalog API for Registered Services\nThe below example will query the Consul Catalog API for nodes that provide the service specified.\n\n```csharp\n//Create the DotNetHttpClient Consul client for the Consul Catalog service interface\nIConsulClient\u003cIConsulCatalogServiceHttpApiService\u003e consulCatalogService =\n\t\t\t\tnew ConsulDotNetHttpClient\u003cIConsulCatalogServiceHttpApiService\u003e(@\"http://localhost:8500\");\n        \nCatalogServiceNodeEntry[] entries = await consulCatalogService.Service.GetServiceNodes(\"TestService\");\n```\n\n# Under Development\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellokitty%2Fconsul.net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellokitty%2Fconsul.net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellokitty%2Fconsul.net/lists"}