Class Consul

java.lang.Object
org.kiwiproject.consul.Consul

public class Consul extends Object
Client for interacting with the Consul HTTP API.
Author:
rfast
  • Field Details

    • DEFAULT_HTTP_HOST

      public static final String DEFAULT_HTTP_HOST
      Default Consul HTTP API host.
      See Also:
    • DEFAULT_HTTP_PORT

      public static final int DEFAULT_HTTP_PORT
      Default Consul HTTP API port.
      See Also:
  • Constructor Details

  • Method Details

    • destroy

      public void destroy()
      Destroys the Object internal state.
    • isDestroyed

      public boolean isDestroyed()
      Check whether the internal state has been shut down.
      Returns:
      true if destroy() was called, otherwise false
    • agentClient

      public AgentClient agentClient()
      Get the Agent HTTP client.

      /v1/agent

      Returns:
      The Agent HTTP client.
    • aclClient

      public AclClient aclClient()
      Get the ACL HTTP client.

      /v1/acl

      Returns:
      The ACL HTTP client.
    • catalogClient

      public CatalogClient catalogClient()
      Get the Catalog HTTP client.

      /v1/catalog

      Returns:
      The Catalog HTTP client.
    • healthClient

      public HealthClient healthClient()
      Get the Health HTTP client.

      /v1/health

      Returns:
      The Health HTTP client.
    • keyValueClient

      public KeyValueClient keyValueClient()
      Get the Key/Value HTTP client.

      /v1/kv

      Returns:
      The Key/Value HTTP client.
    • statusClient

      public StatusClient statusClient()
      Get the Status HTTP client.

      /v1/status

      Returns:
      The Status HTTP client.
    • sessionClient

      public SessionClient sessionClient()
      Get the SessionInfo HTTP client.

      /v1/session

      Returns:
      The SessionInfo HTTP client.
    • eventClient

      public EventClient eventClient()
      Get the Event HTTP client.

      /v1/event

      Returns:
      The Event HTTP client.
    • preparedQueryClient

      public PreparedQueryClient preparedQueryClient()
      Get the Prepared Query HTTP client.

      /v1/query

      Returns:
      The Prepared Query HTTP client.
    • coordinateClient

      public CoordinateClient coordinateClient()
      Get the Coordinate HTTP client.

      /v1/coordinate

      Returns:
      The Coordinate HTTP client.
    • operatorClient

      public OperatorClient operatorClient()
      Get the Operator HTTP client.

      /v1/operator

      Returns:
      The Operator HTTP client.
    • snapshotClient

      public SnapshotClient snapshotClient()
      Get the Snapshot HTTP client.

      /v1/snapshot

      Returns:
      The Snapshot HTTP client.
    • builder

      public static Consul.Builder builder()
      Creates a new Consul.Builder object.
      Returns:
      A new Consul builder.
    • newClient

      public static Consul newClient()
      Used to create a default Consul client.
      Returns:
      A default Consul client.