C# 클래스 ServiceStack.Discovery.Consul.ConsulClient

Consul client deals with consul api calls
파일 보기 프로젝트 열기: MacLeanElectrical/servicestack-discovery-consul 1 사용 예제들

공개 메소드들

메소드 설명
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