Package com.orbitz.consul
Class Consul
- java.lang.Object
-
- com.orbitz.consul.Consul
-
public class Consul extends java.lang.ObjectClient for interacting with the Consul HTTP API.- Author:
- rfast
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConsul.BuilderBuilder forConsulclient objects.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_HTTP_HOSTDefault Consul HTTP API host.static intDEFAULT_HTTP_PORTDefault Consul HTTP API port.
-
Method Summary
Modifier and Type Method Description AclClientaclClient()Get the ACL HTTP client.AgentClientagentClient()Get the Agent HTTP client.static Consul.Builderbuilder()Creates a newConsul.Builderobject.CatalogClientcatalogClient()Get the Catalog HTTP client.CoordinateClientcoordinateClient()Get the Coordinate HTTP client.voiddestroy()Destroys the Object internal state.EventClienteventClient()Get the Event HTTP client.HealthClienthealthClient()Get the Health HTTP client.KeyValueClientkeyValueClient()Get the Key/Value HTTP client.static ConsulnewClient()Used to create a default Consul client.OperatorClientoperatorClient()Get the Operator HTTP client.PreparedQueryClientpreparedQueryClient()Get the Prepared Query HTTP client.SessionClientsessionClient()Get the SessionInfo HTTP client.SnapshotClientsnapshotClient()Get the Snapshot HTTP client.StatusClientstatusClient()Get the Status HTTP client.
-
-
-
Field Detail
-
DEFAULT_HTTP_HOST
public static final java.lang.String DEFAULT_HTTP_HOST
Default Consul HTTP API host.- See Also:
- Constant Field Values
-
DEFAULT_HTTP_PORT
public static final int DEFAULT_HTTP_PORT
Default Consul HTTP API port.- See Also:
- Constant Field Values
-
-
Method Detail
-
destroy
public void destroy()
Destroys the Object internal state.
-
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 newConsul.Builderobject.- Returns:
- A new Consul builder.
-
-