presidium 4.6.1 → 4.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Docker.js +37 -0
- package/package.json +1 -1
package/Docker.js
CHANGED
|
@@ -2304,6 +2304,43 @@ class Docker {
|
|
|
2304
2304
|
return data
|
|
2305
2305
|
}
|
|
2306
2306
|
|
|
2307
|
+
/**
|
|
2308
|
+
* @name inspectTask
|
|
2309
|
+
*
|
|
2310
|
+
* @docs
|
|
2311
|
+
* ```coffeescript [specscript]
|
|
2312
|
+
* module DockerDocs 'https://docs.docker.com/reference/api/engine/version/v1.52/'
|
|
2313
|
+
*
|
|
2314
|
+
* inspectTask(taskId string) -> data Promise<{
|
|
2315
|
+
* ID: string,
|
|
2316
|
+
* Version: DockerDocs.ObjectVersion,
|
|
2317
|
+
* CreatedAt: string, # ISO 8601 date string
|
|
2318
|
+
* UpdatedAt: string, # ISO 8601 date string
|
|
2319
|
+
* Name: string,
|
|
2320
|
+
* Labels: Object<string>,
|
|
2321
|
+
* Spec: DockerDocs.TaskSpec,
|
|
2322
|
+
* ServiceID: string,
|
|
2323
|
+
* Slot: number,
|
|
2324
|
+
* NodeID: string,
|
|
2325
|
+
* AssignedGenericResources: Array<DockerDocs.GenericResources>,
|
|
2326
|
+
* Status: DockerDocs.TaskStatus,
|
|
2327
|
+
* DesiredState: 'new'|'allocated'|'pending'|'assigned'|'accepted'
|
|
2328
|
+
* |'preparing'|'ready'|'starting'|'running'|'complete'|'shutdown'
|
|
2329
|
+
* |'failed'|'rejected'|'remove'|'orphaned',
|
|
2330
|
+
* JobIteration: DockerDocs.ObjectVersion,
|
|
2331
|
+
* NetworksAttachments: Array<{
|
|
2332
|
+
* Network: DockerDocs.Network,
|
|
2333
|
+
* Addresses: Array<cidr string>,
|
|
2334
|
+
* }>,
|
|
2335
|
+
* }>
|
|
2336
|
+
* ```
|
|
2337
|
+
*/
|
|
2338
|
+
async inspectTask(taskId) {
|
|
2339
|
+
const response = await this.http.get(`/tasks/${taskId}`)
|
|
2340
|
+
const data = await handleDockerHTTPResponse(response)
|
|
2341
|
+
return data
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2307
2344
|
/**
|
|
2308
2345
|
* @name listNodes
|
|
2309
2346
|
*
|