1 | import Modem = require('docker-modem');
|
2 | import { Node } from './node';
|
3 | /**
|
4 | * Class reprensenting a swarm
|
5 | */
|
6 | export default class Swarm {
|
7 | modem: Modem;
|
8 | data: Object;
|
9 | /**
|
10 | * Creates a new swarm
|
11 | * @param {Modem} modem Modem to connect to the remote service
|
12 | */
|
13 | constructor(modem: Modem);
|
14 | /**
|
15 | * Initialize a new swarm
|
16 | * https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/#/initialize-a-new-swarm
|
17 | * @param {Object} opts Query params in the request (optional)
|
18 | * Promise} Promise return the new node
{ |
19 | */
|
20 | init(opts?: Object): Promise<Node>;
|
21 | /**
|
22 | * Get low-level information on a swarm
|
23 | * https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/#/inspect-swarm
|
24 | * The reason why this module isn't called inspect is because that interferes with the inspect utility of node.
|
25 | * @param {Object} opts Query params in the request (optional)
|
26 | * @return {Promise} Promise return the swarm
|
27 | */
|
28 | status(opts?: Object): Promise<Swarm>;
|
29 | /**
|
30 | * Join a swarm
|
31 | * https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/#/join-an-existing-swarm
|
32 | * @param {Object} opts Query params in the request (optional)
|
33 | * @return {Promise} Promise return the result
|
34 | */
|
35 | join(opts?: Object): Promise<String>;
|
36 | /**
|
37 | * Leave a swarm
|
38 | * https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/#/leave-a-swarm
|
39 | * @param {Object} opts Query params in the request (optional)
|
40 | * @return {Promise} Promise return the swarm
|
41 | */
|
42 | leave(opts?: Object): Promise<String>;
|
43 | /**
|
44 | * Update a swarm
|
45 | * https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/#/update-a-swarm
|
46 | * @param {Object} opts Query params in the request (optional)
|
47 | * @return {Promise} Promise return the swarm
|
48 | */
|
49 | update(opts?: Object): Promise<String>;
|
50 | }
|