Package org.kiwiproject.consul
Class HealthClient
java.lang.Object
org.kiwiproject.consul.HealthClient
HTTP Client for /v1/health/ endpoints.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetAllServiceInstances
(String service) Retrieves the healthchecks for all nodes.getAllServiceInstances
(String service, QueryOptions queryOptions) Retrieves the healthchecks for all nodes in a given datacenter withQueryOptions
.void
getAllServiceInstances
(String service, QueryOptions queryOptions, ConsulResponseCallback<List<ServiceHealth>> callback) Asynchronously retrieves the healthchecks for all nodes in a given datacenter withQueryOptions
.getChecksByState
(State state) Retrieves the healthchecks for a state.getChecksByState
(State state, QueryOptions queryOptions) Retrieves the healthchecks for a state in a given datacenter withQueryOptions
.void
getChecksByState
(State state, QueryOptions queryOptions, ConsulResponseCallback<List<HealthCheck>> callback) Asynchronously retrieves the healthchecks for a state in a given datacenter withQueryOptions
.getHealthyServiceInstances
(String service) Retrieves the healthchecks for all healthy service instances.getHealthyServiceInstances
(String service, QueryOptions queryOptions) Retrieves the healthchecks for all healthy service instances in a given datacenter withQueryOptions
.void
getHealthyServiceInstances
(String service, QueryOptions queryOptions, ConsulResponseCallback<List<ServiceHealth>> callback) Asynchronously retrieves the healthchecks for all healthy service instances in a given datacenter withQueryOptions
.getNodeChecks
(String node) Retrieves the healthchecks for a node.getNodeChecks
(String node, QueryOptions queryOptions) Retrieves the healthchecks for a node in a given datacenter withQueryOptions
.getServiceChecks
(String service) Retrieves the healthchecks for a service.getServiceChecks
(String service, QueryOptions queryOptions) Retrieves the healthchecks for a service in a given datacenter withQueryOptions
.void
getServiceChecks
(String service, QueryOptions queryOptions, ConsulResponseCallback<List<HealthCheck>> callback) Asynchronously retrieves the healthchecks for a service in a given datacenter withQueryOptions
.
-
Field Details
-
http
-
-
Method Details
-
getNodeChecks
Retrieves the healthchecks for a node.GET /v1/health/node/{node}
- Parameters:
node
- The node to return checks for- Returns:
- A
ConsulResponse
containing a list ofHealthCheck
objects.
-
getNodeChecks
Retrieves the healthchecks for a node in a given datacenter withQueryOptions
.GET /v1/health/node/{node}?dc={datacenter}
- Parameters:
node
- The node to return checks forqueryOptions
- The Query Options to use.- Returns:
- A
ConsulResponse
containing a list ofHealthCheck
objects.
-
getServiceChecks
Retrieves the healthchecks for a service.GET /v1/health/checks/{service}
- Parameters:
service
- the name of the service to get health checks for- Returns:
- A
ConsulResponse
containing a list ofHealthCheck
objects.
-
getServiceChecks
public ConsulResponse<List<HealthCheck>> getServiceChecks(String service, QueryOptions queryOptions) Retrieves the healthchecks for a service in a given datacenter withQueryOptions
.GET /v1/health/checks/{service}?dc={datacenter}
- Parameters:
service
- the name of the service to get health checks forqueryOptions
- The Query Options to use.- Returns:
- A
ConsulResponse
containing a list ofHealthCheck
objects.
-
getServiceChecks
public void getServiceChecks(String service, QueryOptions queryOptions, ConsulResponseCallback<List<HealthCheck>> callback) Asynchronously retrieves the healthchecks for a service in a given datacenter withQueryOptions
.GET /v1/health/checks/{service}?dc={datacenter}
- Parameters:
service
- The service to query.queryOptions
- The Query Options to use.callback
- Callback implemented by callee to handle results.HealthCheck
objects.
-
getChecksByState
Retrieves the healthchecks for a state.GET /v1/health/state/{state}
- Parameters:
state
- The state to query.- Returns:
- A
ConsulResponse
containing a list ofHealthCheck
objects.
-
getChecksByState
Retrieves the healthchecks for a state in a given datacenter withQueryOptions
.GET /v1/health/state/{state}?dc={datacenter}
- Parameters:
state
- The state to query.queryOptions
- The Query Options to use.- Returns:
- A
ConsulResponse
containing a list ofHealthCheck
objects.
-
getChecksByState
public void getChecksByState(State state, QueryOptions queryOptions, ConsulResponseCallback<List<HealthCheck>> callback) Asynchronously retrieves the healthchecks for a state in a given datacenter withQueryOptions
.GET /v1/health/state/{state}?dc={datacenter}
- Parameters:
state
- The state to query.queryOptions
- The Query Options to use.callback
- Callback implemented by callee to handle results, containing a list ofHealthCheck
objects.
-
getHealthyServiceInstances
Retrieves the healthchecks for all healthy service instances.GET /v1/health/service/{service}?passing
- Parameters:
service
- The service to query.- Returns:
- A
ConsulResponse
containing a list ofHealthCheck
objects.
-
getHealthyServiceInstances
public ConsulResponse<List<ServiceHealth>> getHealthyServiceInstances(String service, QueryOptions queryOptions) Retrieves the healthchecks for all healthy service instances in a given datacenter withQueryOptions
.GET /v1/health/service/{service}?dc={datacenter}&passing
- Parameters:
service
- The service to query.queryOptions
- The Query Options to use.- Returns:
- A
ConsulResponse
containing a list ofHealthCheck
objects.
-
getHealthyServiceInstances
public void getHealthyServiceInstances(String service, QueryOptions queryOptions, ConsulResponseCallback<List<ServiceHealth>> callback) Asynchronously retrieves the healthchecks for all healthy service instances in a given datacenter withQueryOptions
.GET /v1/health/service/{service}?dc={datacenter}&passing
Experimental.
- Parameters:
service
- The service to query.queryOptions
- The Query Options to use.callback
- Callback implemented by callee to handle results.
-
getAllServiceInstances
Retrieves the healthchecks for all nodes.GET /v1/health/service/{service}
- Parameters:
service
- The service to query.- Returns:
- A
ConsulResponse
containing a list ofHealthCheck
objects.
-
getAllServiceInstances
public ConsulResponse<List<ServiceHealth>> getAllServiceInstances(String service, QueryOptions queryOptions) Retrieves the healthchecks for all nodes in a given datacenter withQueryOptions
.GET /v1/health/service/{service}?dc={datacenter}
- Parameters:
service
- The service to query.queryOptions
- The Query Options to use.- Returns:
- A
ConsulResponse
containing a list ofHealthCheck
objects.
-
getAllServiceInstances
public void getAllServiceInstances(String service, QueryOptions queryOptions, ConsulResponseCallback<List<ServiceHealth>> callback) Asynchronously retrieves the healthchecks for all nodes in a given datacenter withQueryOptions
.GET /v1/health/service/{service}?dc={datacenter}
Experimental.
- Parameters:
service
- The service to query.queryOptions
- The Query Options to use.callback
- Callback implemented by callee to handle results.
-
getNetworkTimeoutConfig
-
getConfig
-
getEventHandler
-