public class HeliosClient extends Object implements Closeable
| Modifier and Type | Class and Description |
|---|---|
static class |
HeliosClient.Builder |
| Constructor and Description |
|---|
HeliosClient(String user,
com.spotify.helios.client.RequestDispatcher dispatcher) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static HeliosClient |
create(String domain,
String user)
Create a new helios client as a specific user, connecting to a helios master cluster in a
specific domain.
|
com.google.common.util.concurrent.ListenableFuture<CreateDeploymentGroupResponse> |
createDeploymentGroup(DeploymentGroup descriptor) |
com.google.common.util.concurrent.ListenableFuture<CreateJobResponse> |
createJob(Job descriptor) |
com.google.common.util.concurrent.ListenableFuture<JobDeleteResponse> |
deleteJob(JobId id) |
com.google.common.util.concurrent.ListenableFuture<JobDeleteResponse> |
deleteJob(JobId id,
String token) |
com.google.common.util.concurrent.ListenableFuture<JobDeployResponse> |
deploy(Deployment job,
String host) |
com.google.common.util.concurrent.ListenableFuture<JobDeployResponse> |
deploy(Deployment job,
String host,
String token) |
com.google.common.util.concurrent.ListenableFuture<Deployment> |
deployment(String host,
JobId job) |
com.google.common.util.concurrent.ListenableFuture<DeploymentGroup> |
deploymentGroup(String name) |
com.google.common.util.concurrent.ListenableFuture<DeploymentGroupStatusResponse> |
deploymentGroupStatus(String name) |
com.google.common.util.concurrent.ListenableFuture<HostDeregisterResponse> |
deregisterHost(String host) |
com.google.common.util.concurrent.ListenableFuture<HostStatus> |
hostStatus(String host) |
com.google.common.util.concurrent.ListenableFuture<HostStatus> |
hostStatus(String host,
Map<String,String> queryParams) |
com.google.common.util.concurrent.ListenableFuture<Map<String,HostStatus>> |
hostStatuses(List<String> hosts) |
com.google.common.util.concurrent.ListenableFuture<Map<String,HostStatus>> |
hostStatuses(List<String> hosts,
Map<String,String> queryParams) |
com.google.common.util.concurrent.ListenableFuture<TaskStatusEvents> |
jobHistory(JobId jobId) |
com.google.common.util.concurrent.ListenableFuture<Map<JobId,Job>> |
jobs() |
com.google.common.util.concurrent.ListenableFuture<Map<JobId,Job>> |
jobs(String query) |
com.google.common.util.concurrent.ListenableFuture<JobStatus> |
jobStatus(JobId jobId) |
com.google.common.util.concurrent.ListenableFuture<Map<JobId,JobStatus>> |
jobStatuses(Set<JobId> jobs) |
com.google.common.util.concurrent.ListenableFuture<List<String>> |
listDeploymentGroups() |
com.google.common.util.concurrent.ListenableFuture<List<String>> |
listHosts()
Returns a list of all hosts registered in the Helios cluster.
|
com.google.common.util.concurrent.ListenableFuture<List<String>> |
listHosts(Set<String> unparsedHostSelectors)
Returns a list of all hosts registered in the Helios cluster which match the given list of
host
selectors.
|
com.google.common.util.concurrent.ListenableFuture<List<String>> |
listHosts(String namePattern)
Returns a list of all hosts registered in the Helios cluster whose name matches the given
pattern.
|
com.google.common.util.concurrent.ListenableFuture<List<String>> |
listHosts(String namePattern,
Set<String> unparsedHostSelectors)
Returns a list of all hosts registered in the Helios cluster that match both the given hostname
pattern and set of host selectors.
|
com.google.common.util.concurrent.ListenableFuture<List<String>> |
listMasters() |
static HeliosClient.Builder |
newBuilder() |
com.google.common.util.concurrent.ListenableFuture<Integer> |
registerHost(String host,
String id) |
com.google.common.util.concurrent.ListenableFuture<RemoveDeploymentGroupResponse> |
removeDeploymentGroup(String name) |
com.google.common.util.concurrent.ListenableFuture<RollingUpdateResponse> |
rollingUpdate(String deploymentGroupName,
JobId job,
RolloutOptions options) |
com.google.common.util.concurrent.ListenableFuture<SetGoalResponse> |
setGoal(Deployment job,
String host) |
com.google.common.util.concurrent.ListenableFuture<SetGoalResponse> |
setGoal(Deployment job,
String host,
String token) |
com.google.common.util.concurrent.ListenableFuture<Integer> |
stopDeploymentGroup(String deploymentGroupName) |
com.google.common.util.concurrent.ListenableFuture<JobUndeployResponse> |
undeploy(JobId jobId,
String host) |
com.google.common.util.concurrent.ListenableFuture<JobUndeployResponse> |
undeploy(JobId jobId,
String host,
String token) |
com.google.common.util.concurrent.ListenableFuture<VersionResponse> |
version() |
public HeliosClient(String user, com.spotify.helios.client.RequestDispatcher dispatcher)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic com.google.common.util.concurrent.ListenableFuture<JobDeployResponse> deploy(Deployment job, String host)
public com.google.common.util.concurrent.ListenableFuture<JobDeployResponse> deploy(Deployment job, String host, String token)
public com.google.common.util.concurrent.ListenableFuture<SetGoalResponse> setGoal(Deployment job, String host)
public com.google.common.util.concurrent.ListenableFuture<SetGoalResponse> setGoal(Deployment job, String host, String token)
public com.google.common.util.concurrent.ListenableFuture<Deployment> deployment(String host, JobId job)
public com.google.common.util.concurrent.ListenableFuture<HostStatus> hostStatus(String host)
public com.google.common.util.concurrent.ListenableFuture<HostStatus> hostStatus(String host, Map<String,String> queryParams)
public com.google.common.util.concurrent.ListenableFuture<Map<String,HostStatus>> hostStatuses(List<String> hosts)
public com.google.common.util.concurrent.ListenableFuture<Map<String,HostStatus>> hostStatuses(List<String> hosts, Map<String,String> queryParams)
public com.google.common.util.concurrent.ListenableFuture<Integer> registerHost(String host, String id)
public com.google.common.util.concurrent.ListenableFuture<JobDeleteResponse> deleteJob(JobId id)
public com.google.common.util.concurrent.ListenableFuture<JobDeleteResponse> deleteJob(JobId id, String token)
public com.google.common.util.concurrent.ListenableFuture<JobUndeployResponse> undeploy(JobId jobId, String host)
public com.google.common.util.concurrent.ListenableFuture<JobUndeployResponse> undeploy(JobId jobId, String host, String token)
public com.google.common.util.concurrent.ListenableFuture<HostDeregisterResponse> deregisterHost(String host)
public com.google.common.util.concurrent.ListenableFuture<List<String>> listHosts()
public com.google.common.util.concurrent.ListenableFuture<List<String>> listHosts(String namePattern)
public com.google.common.util.concurrent.ListenableFuture<List<String>> listHosts(Set<String> unparsedHostSelectors)
For example, listHosts(Arrays.asList("site=foo")) will return all agents in the
cluster whose labels match the expression site=foo.
public com.google.common.util.concurrent.ListenableFuture<List<String>> listHosts(String namePattern, Set<String> unparsedHostSelectors)
listHosts(Set)public com.google.common.util.concurrent.ListenableFuture<VersionResponse> version()
public com.google.common.util.concurrent.ListenableFuture<CreateJobResponse> createJob(Job descriptor)
public com.google.common.util.concurrent.ListenableFuture<TaskStatusEvents> jobHistory(JobId jobId)
public com.google.common.util.concurrent.ListenableFuture<JobStatus> jobStatus(JobId jobId)
public com.google.common.util.concurrent.ListenableFuture<Map<JobId,JobStatus>> jobStatuses(Set<JobId> jobs)
public com.google.common.util.concurrent.ListenableFuture<DeploymentGroup> deploymentGroup(String name)
public com.google.common.util.concurrent.ListenableFuture<List<String>> listDeploymentGroups()
public com.google.common.util.concurrent.ListenableFuture<DeploymentGroupStatusResponse> deploymentGroupStatus(String name)
public com.google.common.util.concurrent.ListenableFuture<CreateDeploymentGroupResponse> createDeploymentGroup(DeploymentGroup descriptor)
public com.google.common.util.concurrent.ListenableFuture<RemoveDeploymentGroupResponse> removeDeploymentGroup(String name)
public com.google.common.util.concurrent.ListenableFuture<RollingUpdateResponse> rollingUpdate(String deploymentGroupName, JobId job, RolloutOptions options)
public com.google.common.util.concurrent.ListenableFuture<Integer> stopDeploymentGroup(String deploymentGroupName)
public static HeliosClient.Builder newBuilder()
public static HeliosClient create(String domain, String user)
domain - The target domain.user - The user to identify as.Copyright © 2017. All rights reserved.