C# Класс ServiceStack.Discovery.Consul.ConsulClient

Consul client deals with consul api calls
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetService ( string serviceName, string tagName ) : ConsulServiceResponse

Gets the service

GetServices ( string serviceName ) : ServiceStack.Discovery.Consul.ConsulServiceResponse[]

Returns a list of catalog services and tags

RegisterHealthChecks ( ) : void

Registers service health checks with consul

RegisterService ( ServiceRegistration registration ) : void

Registers the servicestack apphost with the local consul agent

UnregisterService ( string serviceId ) : void

Removes a service registation (and it's associated health checks) from consul

Приватные методы

Метод Описание
GetConsulServiceResponses ( string response ) : ServiceStack.Discovery.Consul.ConsulServiceResponse[]

Описание методов

GetService() публичный статический Метод

Gets the service
throws exception if no service available for dto
public static GetService ( string serviceName, string tagName ) : ConsulServiceResponse
serviceName string The global service name for servicestack services
tagName string the tagName to find the service for
Результат ConsulServiceResponse

GetServices() публичный статический Метод

Returns a list of catalog services and tags
throws exception if unable to get services
public static GetServices ( string serviceName ) : ServiceStack.Discovery.Consul.ConsulServiceResponse[]
serviceName string
Результат ServiceStack.Discovery.Consul.ConsulServiceResponse[]

RegisterHealthChecks() публичный статический Метод

Registers service health checks with consul
throws exception if unable to register health checks
public static RegisterHealthChecks ( ) : void
Результат void

RegisterService() публичный статический Метод

Registers the servicestack apphost with the local consul agent
throws exception if registration was not successful
public static RegisterService ( ServiceRegistration registration ) : void
registration ServiceRegistration
Результат void

UnregisterService() публичный статический Метод

Removes a service registation (and it's associated health checks) from consul
throws exception if unregistration was not successful
public static UnregisterService ( string serviceId ) : void
serviceId string the id of the service to unregister
Результат void