wwwlicious / servicestack-discovery-consul

ServiceStack Plugin for Service Discovery using Consul.io
Other
64 stars 13 forks source link

Update ConsulClient to only return services in `passing` state #14

Closed donaldgray closed 8 years ago

donaldgray commented 8 years ago

I updated calls to query Consul to call /health/ endpoints rather than /catalog/ so that the ?passing query string is respected.

The shape of the JSON that comes back from health requests differs hence the introduction of an intermediary type, ConsulHealthResponse, to make deserialization easier while maintaining the same return object from ConsulClient.GetServices and ConsulClient.GetService requests.