Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) CancelWatch(watchID string) error
- func (c *Client) Cleanup()
- func (c *Client) DisableKillTasksAction() error
- func (c *Client) ExtractHostnames(hosts string, hostSeparator string) ([]string, error)
- func (c *Client) HostCacheDump() error
- func (c *Client) HostMaintenanceCompleteAction(hostname string) error
- func (c *Client) HostMaintenanceStartAction(hostname string) error
- func (c *Client) HostPoolChangePool(host, source, dest string) error
- func (c *Client) HostPoolCreate(name string) error
- func (c *Client) HostPoolDelete(name string) error
- func (c *Client) HostPoolList() error
- func (c *Client) HostPoolListHosts(name string) error
- func (c *Client) HostQueryAction(states string) error
- func (c *Client) HostsGetAction(cpu float64, gpu float64, cmpLess bool, hosts string) error
- func (c *Client) JobCreateAction(jobID, respoolPath, cfg, secretPath string, secret []byte) error
- func (c *Client) JobDeleteAction(jobID string) error
- func (c *Client) JobGetAction(jobID string) error
- func (c *Client) JobGetActiveJobsAction() error
- func (c *Client) JobGetCacheAction(jobID string) error
- func (c *Client) JobMgrGetThrottledPods() error
- func (c *Client) JobMgrQueryJobCache(labels string, name string) error
- func (c *Client) JobQueryAction(labels string, respoolPath string, keywords string, states string, ...) error
- func (c *Client) JobRefreshAction(jobID string) error
- func (c *Client) JobRestartAction(jobID string, resourceVersion uint64, instanceRanges []*task.InstanceRange, ...) error
- func (c *Client) JobStartAction(jobID string, resourceVersion uint64, instanceRanges []*task.InstanceRange, ...) error
- func (c *Client) JobStatusAction(jobID string) error
- func (c *Client) JobStopAction(jobID string, showProgress bool, owner string, labels string, isForceStop bool) error
- func (c *Client) JobStopV1BetaAction(jobID string, resourceVersion uint64, instanceRanges []*task.InstanceRange, ...) error
- func (c *Client) JobUpdateAction(jobID, cfg, secretPath string, secret []byte) error
- func (c *Client) LockComponents(components []string) error
- func (c *Client) LookupResourcePoolID(resourcePoolPath string) (*peloton.ResourcePoolID, error)
- func (c *Client) OffersGetAction() error
- func (c *Client) PodDeleteEvents(podName string, podID string) error
- func (c *Client) PodGetAction(podName string, statusOnly bool, limit uint32) error
- func (c *Client) PodGetCacheAction(podName string) error
- func (c *Client) PodGetEventsAction(jobID string, instanceID uint32, runID string, limit uint64) error
- func (c *Client) PodGetEventsV1AlphaAction(podName string, podID string) error
- func (c *Client) PodLogsGetAction(filename string, podName string, podID string) error
- func (c *Client) PodRefreshAction(podName string) error
- func (c *Client) PodRestartAction(podName string) error
- func (c *Client) PodStartAction(podName string) error
- func (c *Client) PodStopAction(podName string) error
- func (c *Client) ResMgrGetActiveTasks(jobID string, respoolID string, states string) error
- func (c *Client) ResMgrGetOrphanTasks(respoolID string) error
- func (c *Client) ResMgrGetPendingTasks(respoolID string, limit uint32) error
- func (c *Client) ResPoolCreateAction(respoolPath string, cfgFile string) error
- func (c *Client) ResPoolDeleteAction(respoolPath string) error
- func (c *Client) ResPoolDumpAction(resPoolDumpFormat string) error
- func (c *Client) ResPoolUpdateAction(respoolPath string, cfgFile string) error
- func (c *Client) StatelessCreateAction(jobID string, respoolPath string, batchSize uint32, cfg string, ...) error
- func (c *Client) StatelessDeleteAction(jobID string, version string, forceDelete bool) error
- func (c *Client) StatelessGetAction(jobID string, version string, summaryOnly bool) error
- func (c *Client) StatelessGetCacheAction(jobID string) error
- func (c *Client) StatelessListJobsAction() error
- func (c *Client) StatelessListPodsAction(jobID string, instanceRange *task.InstanceRange) error
- func (c *Client) StatelessListUpdatesAction(jobID string, updatesLimit uint32) error
- func (c *Client) StatelessQueryAction(labels string, respoolPath string, keywords string, states string, ...) error
- func (c *Client) StatelessQueryPodsAction(jobID string, states string, names string, hosts string, limit uint32, ...) error
- func (c *Client) StatelessRefreshAction(jobID string) error
- func (c *Client) StatelessReplaceJobAction(jobID string, spec string, batchSize uint32, respoolPath string, ...) error
- func (c *Client) StatelessReplaceJobDiffAction(jobID string, spec string, entityVersion string, respoolPath string) error
- func (c *Client) StatelessRestartJobAction(jobID string, batchSize uint32, entityVersion string, ...) error
- func (c *Client) StatelessStartJobAction(jobID string, entityVersion string) error
- func (c *Client) StatelessStopJobAction(jobID string, entityVersion string) error
- func (c *Client) StatelessWorkflowAbortAction(jobID string, entityVersion string, opaqueData string) error
- func (c *Client) StatelessWorkflowEventsAction(jobID string, instanceID uint32) error
- func (c *Client) StatelessWorkflowPauseAction(jobID string, entityVersion string, opaqueData string) error
- func (c *Client) StatelessWorkflowResumeAction(jobID string, entityVersion string, opaqueData string) error
- func (c *Client) TaskGetAction(jobID string, instanceID uint32) error
- func (c *Client) TaskGetCacheAction(jobID string, instanceID uint32) error
- func (c *Client) TaskGetEventsAction(jobID string, instanceID uint32) error
- func (c *Client) TaskListAction(jobID string, instanceRange *task.InstanceRange) error
- func (c *Client) TaskLogsGetAction(fileName string, jobID string, instanceID uint32, taskID string) error
- func (c *Client) TaskQueryAction(jobID string, states string, names string, hosts string, limit uint32, ...) error
- func (c *Client) TaskRefreshAction(jobID string, instanceRange *task.InstanceRange) error
- func (c *Client) TaskRestartAction(jobID string, instanceRanges []*task.InstanceRange) error
- func (c *Client) TaskStartAction(jobID string, instanceRanges []*task.InstanceRange) error
- func (c *Client) TaskStopAction(jobID string, instanceRanges []*task.InstanceRange) error
- func (c *Client) UnlockComponents(components []string) error
- func (c *Client) UpdateAbortAction(updateID string, opaqueData string) error
- func (c *Client) UpdateCreateAction(jobID string, cfg string, batchSize uint32, respoolPath string, ...) error
- func (c *Client) UpdateGetAction(updateID string) error
- func (c *Client) UpdateGetCacheAction(updateID string) error
- func (c *Client) UpdateListAction(jobID string) error
- func (c *Client) UpdatePauseAction(updateID string, opaqueData string) error
- func (c *Client) UpdateResumeAction(updateID string, opaqueData string) error
- func (c *Client) VolumeDeleteAction(volumeID string) error
- func (c *Client) VolumeListAction(jobID string) error
- func (c *Client) WatchEventStreamEvents(topicToWatch string) error
- func (c *Client) WatchHostSummaryEvent(topicToWatch string) error
- func (c *Client) WatchPod(jobID string, podNames []string, labels []string) error
Constants ¶
const ResourcePoolPathDelim = "/"
ResourcePoolPathDelim is the resource pool path delimiter
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // Debug is whether debug output is enabled Debug bool // contains filtered or unexported fields }
Client is a JSON Client with associated dispatcher and context
func New ¶
func New( discovery leader.Discovery, timeout time.Duration, authConfig *middleware.BasicAuthConfig, debug bool) (*Client, error)
New returns a new RPC client given a framework URL and timeout and error
func (*Client) CancelWatch ¶
CancelWatch is the action for cancelling an existing watch stream.
func (*Client) Cleanup ¶
func (c *Client) Cleanup()
Cleanup ensures the client's YARPC dispatcher is stopped
func (*Client) DisableKillTasksAction ¶
DisableKillTasksAction disable the kill task request to mesos master
func (*Client) ExtractHostnames ¶
ExtractHostnames extracts a list of hosts from a comma-separated list
func (*Client) HostCacheDump ¶
HostCacheDump dumps the contents of the host cache.
func (*Client) HostMaintenanceCompleteAction ¶
HostMaintenanceCompleteAction is the action for completing host maintenance. Complete maintenance brings UP a host which is in maintenance by posting to /machine/up endpoint of Mesos Master i.e. the machine transitions from DOWN to UP state (Please check Mesos Maintenance Primitives for more info)
func (*Client) HostMaintenanceStartAction ¶
HostMaintenanceStartAction is the action for starting host maintenance. StartMaintenance puts the host into DRAINING state by posting a maintenance schedule to Mesos Master. Inverse offers are sent out and all future offers from the host are tagged with unavailability (Please check Mesos Maintenance Primitives for more info). The host is first drained of tasks before being put into maintenance by posting to /machine/down endpoint of Mesos Master. The host transitions from UP to DRAINING and finally to DOWN.
func (*Client) HostPoolChangePool ¶
HostPoolChangePool changes the pool for a host.
func (*Client) HostPoolCreate ¶
HostPoolCreate creates a host pool.
func (*Client) HostPoolDelete ¶
HostPoolDelete deletes a host pool.
func (*Client) HostPoolList ¶
HostPoolList lists all the host pools.
func (*Client) HostPoolListHosts ¶
HostPoolListHosts lists all hosts in a host pool.
func (*Client) HostQueryAction ¶
HostQueryAction is the action for querying hosts by states. This can be to used to monitor the state of the host(s) Eg. When a list of hosts are put into maintenance (`host maintenance start`). A host, at any given time, will be in one of the following states
1.HostState_HOST_STATE_UP - The host is up and running 2.HostState_HOST_STATE_DRAINING - The tasks running on the host are being rescheduled and there will be no further placement of tasks on the host 3.HostState_HOST_STATE_DRAINED - There are no tasks running on this host and it is ready to be 'DOWN'ed 4.HostState_HOST_STATE_DOWN - The host is in maintenance.
func (*Client) HostsGetAction ¶
HostsGetAction prints all the hosts based on resource requirement passed in.
func (*Client) JobCreateAction ¶
func (c *Client) JobCreateAction( jobID, respoolPath, cfg, secretPath string, secret []byte, ) error
JobCreateAction is the action for creating a job
func (*Client) JobDeleteAction ¶
JobDeleteAction is the action for deleting a job
func (*Client) JobGetAction ¶
JobGetAction is the action for getting a job
func (*Client) JobGetActiveJobsAction ¶
JobGetActiveJobsAction is the action for getting active jobs list
func (*Client) JobGetCacheAction ¶
JobGetCacheAction is the action for getting a job cache
func (*Client) JobMgrGetThrottledPods ¶
func (*Client) JobMgrQueryJobCache ¶
func (*Client) JobQueryAction ¶
func (c *Client) JobQueryAction( labels string, respoolPath string, keywords string, states string, owner string, name string, days uint32, limit uint32, maxLimit uint32, offset uint32, sortBy string, sortOrder string) error
JobQueryAction is the action for getting job ids by labels, respool path, keywords, state(s), owner and jobname
func (*Client) JobRefreshAction ¶
JobRefreshAction calls the refresh API for a job
func (*Client) JobRestartAction ¶
func (c *Client) JobRestartAction( jobID string, resourceVersion uint64, instanceRanges []*task.InstanceRange, batchSize uint32, ) error
JobRestartAction is the action for restarting a job
func (*Client) JobStartAction ¶
func (c *Client) JobStartAction( jobID string, resourceVersion uint64, instanceRanges []*task.InstanceRange, batchSize uint32, ) error
JobStartAction is the action for starting a job
func (*Client) JobStatusAction ¶
JobStatusAction is the action for getting status of a job
func (*Client) JobStopAction ¶
func (c *Client) JobStopAction( jobID string, showProgress bool, owner string, labels string, isForceStop bool, ) error
JobStopAction is the action of stopping job(s) by jobID, owner and labels
func (*Client) JobStopV1BetaAction ¶
func (c *Client) JobStopV1BetaAction( jobID string, resourceVersion uint64, instanceRanges []*task.InstanceRange, batchSize uint32, ) error
JobStopV1BetaAction is the action for stopping a job using new job API
func (*Client) JobUpdateAction ¶
JobUpdateAction is the action of updating a job
func (*Client) LockComponents ¶
func (*Client) LookupResourcePoolID ¶
func (c *Client) LookupResourcePoolID(resourcePoolPath string) (*peloton.ResourcePoolID, error)
LookupResourcePoolID returns the resource pool ID for a given path
func (*Client) OffersGetAction ¶
OffersGetAction prints all the outstanding offers present in Host Manager offer pool.
func (*Client) PodDeleteEvents ¶
PodDeleteEvents is the action for deleting events of the pod
func (*Client) PodGetAction ¶
PodGetAction is the action for getting the info of the pod
func (*Client) PodGetCacheAction ¶
PodGetCacheAction is the action to get pod status from cache
func (*Client) PodGetEventsAction ¶
func (c *Client) PodGetEventsAction( jobID string, instanceID uint32, runID string, limit uint64) error
PodGetEventsAction returns pod events in reverse chronological order.
func (*Client) PodGetEventsV1AlphaAction ¶
PodGetEventsV1AlphaAction is the action to get the events of a given pod
func (*Client) PodLogsGetAction ¶
PodLogsGetAction is the action to get logs files for given pod
func (*Client) PodRefreshAction ¶
PodRefreshAction is the action to refresh the pod
func (*Client) PodRestartAction ¶
PodRestartAction is the action for restarting the pod
func (*Client) PodStartAction ¶
PodStartAction is the action for starting the pod
func (*Client) PodStopAction ¶
PodStopAction is the action for stopping the pod
func (*Client) ResMgrGetActiveTasks ¶
ResMgrGetActiveTasks fetches the active tasks from resource manager.
func (*Client) ResMgrGetOrphanTasks ¶
ResMgrGetOrphanTasks fetches the orphan tasks from resource manager.
func (*Client) ResMgrGetPendingTasks ¶
ResMgrGetPendingTasks fetches the pending tasks from resource manager.
func (*Client) ResPoolCreateAction ¶
ResPoolCreateAction is the action for creating a resource pool
func (*Client) ResPoolDeleteAction ¶
ResPoolDeleteAction is the action for deleting a resource pool
func (*Client) ResPoolDumpAction ¶
ResPoolDumpAction dumps the resource pool tree
func (*Client) ResPoolUpdateAction ¶
ResPoolUpdateAction is the action for updating an existing resource pool
func (*Client) StatelessCreateAction ¶
func (c *Client) StatelessCreateAction( jobID string, respoolPath string, batchSize uint32, cfg string, secretPath string, secret []byte, opaque string, startPaused bool, maxInstanceRetries uint32, maxTolerableInstanceFailures uint32, ) error
StatelessCreateAction is the action for creating a stateless job
func (*Client) StatelessDeleteAction ¶
StatelessDeleteAction is the action for deleting a stateless job
func (*Client) StatelessGetAction ¶
StatelessGetAction is the action for getting status and spec (or only summary) of a stateless job
func (*Client) StatelessGetCacheAction ¶
StatelessGetCacheAction get cache of stateless job
func (*Client) StatelessListJobsAction ¶
StatelessListJobsAction prints summary of all jobs using the ListJobs API
func (*Client) StatelessListPodsAction ¶
func (c *Client) StatelessListPodsAction( jobID string, instanceRange *task.InstanceRange, ) error
StatelessListPodsAction is the action to list pods in a job
func (*Client) StatelessListUpdatesAction ¶
StatelessListUpdatesAction lists updates of a job
func (*Client) StatelessQueryAction ¶
func (c *Client) StatelessQueryAction( labels string, respoolPath string, keywords string, states string, owner string, name string, days uint32, limit uint32, maxLimit uint32, offset uint32, sortBy string, sortOrder string) error
StatelessQueryAction queries a job given the spec
func (*Client) StatelessQueryPodsAction ¶
func (c *Client) StatelessQueryPodsAction( jobID string, states string, names string, hosts string, limit uint32, offset uint32, sortBy string, sortOrder string, ) error
StatelessQueryPodsAction is the action for querying pods of a job
func (*Client) StatelessRefreshAction ¶
StatelessRefreshAction refreshes a job
func (*Client) StatelessReplaceJobAction ¶
func (c *Client) StatelessReplaceJobAction( jobID string, spec string, batchSize uint32, respoolPath string, entityVersion string, override bool, maxInstanceRetries uint32, maxTolerableInstanceFailures uint32, rollbackOnFailure bool, startPaused bool, opaqueData string, inPlace bool, startPods bool, ) error
StatelessReplaceJobAction updates job by replace its config
func (*Client) StatelessReplaceJobDiffAction ¶
func (c *Client) StatelessReplaceJobDiffAction( jobID string, spec string, entityVersion string, respoolPath string, ) error
StatelessReplaceJobDiffAction returns the set of instances which will be added, removed, updated and remain unchanged for a new job specification for a given job
func (*Client) StatelessRestartJobAction ¶
func (c *Client) StatelessRestartJobAction( jobID string, batchSize uint32, entityVersion string, instanceRanges []*task.InstanceRange, opaqueData string, inPlace bool, ) error
StatelessRestartJobAction restarts a job
func (*Client) StatelessStartJobAction ¶
StatelessStartJobAction is the action for starting a stateless job
func (*Client) StatelessStopJobAction ¶
StatelessStopJobAction stops a job
func (*Client) StatelessWorkflowAbortAction ¶
func (c *Client) StatelessWorkflowAbortAction( jobID string, entityVersion string, opaqueData string, ) error
StatelessWorkflowAbortAction aborts a workflow
func (*Client) StatelessWorkflowEventsAction ¶
StatelessWorkflowEventsAction gets most recent active or completed workflow events for a job
func (*Client) StatelessWorkflowPauseAction ¶
func (c *Client) StatelessWorkflowPauseAction( jobID string, entityVersion string, opaqueData string, ) error
StatelessWorkflowPauseAction pauses a workflow
func (*Client) StatelessWorkflowResumeAction ¶
func (c *Client) StatelessWorkflowResumeAction( jobID string, entityVersion string, opaqueData string, ) error
StatelessWorkflowResumeAction resumes a workflow
func (*Client) TaskGetAction ¶
TaskGetAction is the action to get a task instance
func (*Client) TaskGetCacheAction ¶
TaskGetCacheAction is the acion to get a task cache
func (*Client) TaskGetEventsAction ¶
TaskGetEventsAction is the action to get a task instance
func (*Client) TaskListAction ¶
func (c *Client) TaskListAction(jobID string, instanceRange *task.InstanceRange) error
TaskListAction is the action to list tasks
func (*Client) TaskLogsGetAction ¶
func (c *Client) TaskLogsGetAction(fileName string, jobID string, instanceID uint32, taskID string) error
TaskLogsGetAction is the action to get logs files for given job instance.
func (*Client) TaskQueryAction ¶
func (c *Client) TaskQueryAction( jobID string, states string, names string, hosts string, limit uint32, offset uint32, sortBy string, sortOrder string) error
TaskQueryAction is the action to query task
func (*Client) TaskRefreshAction ¶
func (c *Client) TaskRefreshAction(jobID string, instanceRange *task.InstanceRange) error
TaskRefreshAction calls task refresh API
func (*Client) TaskRestartAction ¶
func (c *Client) TaskRestartAction(jobID string, instanceRanges []*task.InstanceRange) error
TaskRestartAction is the action to restart a task
func (*Client) TaskStartAction ¶
func (c *Client) TaskStartAction(jobID string, instanceRanges []*task.InstanceRange) error
TaskStartAction is the action to start a task
func (*Client) TaskStopAction ¶
func (c *Client) TaskStopAction(jobID string, instanceRanges []*task.InstanceRange) error
TaskStopAction is the action to stop a task
func (*Client) UnlockComponents ¶
func (*Client) UpdateAbortAction ¶
UpdateAbortAction aborts a given update
func (*Client) UpdateCreateAction ¶
func (c *Client) UpdateCreateAction( jobID string, cfg string, batchSize uint32, respoolPath string, configVersion uint64, override bool, maxInstanceAttempts uint32, maxFailureInstances uint32, updateRollbackOnFailure bool, updateStartInPausedState bool, opaqueData string, inPlace bool) error
UpdateCreateAction will create a new job update.
func (*Client) UpdateGetAction ¶
UpdateGetAction gets the summary/full update information
func (*Client) UpdateGetCacheAction ¶
UpdateGetCacheAction fetches the information stored in the cache for the update
func (*Client) UpdateListAction ¶
UpdateListAction lists all actions of a job update
func (*Client) UpdatePauseAction ¶
UpdatePauseAction pauses a given update
func (*Client) UpdateResumeAction ¶
UpdateResumeAction resumes a given update
func (*Client) VolumeDeleteAction ¶
VolumeDeleteAction is the action to delete given volume.
func (*Client) VolumeListAction ¶
VolumeListAction is the action to list volume for a job.
func (*Client) WatchEventStreamEvents ¶
WatchEventStreamEvents is the action for starting a watch stream for mesos task update events
func (*Client) WatchHostSummaryEvent ¶
WatchHostSummaryEvent is the action for starting a watch stream for host summary events