@@ -43,6 +43,15 @@ The following fleetctl sub-commands are available in this module:
43
43
44
44
** list-machines**
45
45
``` javascript
46
+ /**
47
+ * Enumerate the current hosts in the cluster
48
+ * @method
49
+ * @param {function} callback function
50
+ *
51
+ * @callback
52
+ * @param {error} error object
53
+ * @param {array} list of machines
54
+ */
46
55
fleetctl .list_machines (function (err , machines ){
47
56
if (err)
48
57
throw err;
@@ -53,6 +62,15 @@ fleetctl.list_machines(function(err, machines){
53
62
54
63
** list-units**
55
64
``` javascript
65
+ /**
66
+ * List the current state of units in the cluster
67
+ * @method
68
+ * @param {function} callback function
69
+ *
70
+ * @callback
71
+ * @param {error} error object
72
+ * @param {array} list of units
73
+ */
56
74
fleetctl .list_units (function (err , units ){
57
75
if (err)
58
76
throw err;
@@ -63,6 +81,15 @@ fleetctl.list_units(function(err, units){
63
81
64
82
** list-unit-files**
65
83
``` javascript
84
+ /**
85
+ * List the units that exist in the cluster
86
+ * @method
87
+ * @param {function} callback function
88
+ *
89
+ * @callback
90
+ * @param {error} error object
91
+ * @param {array} list of unit files
92
+ */
66
93
fleetctl .list_unit_files (function (err , unit_files ){
67
94
if (err)
68
95
throw err;
@@ -73,6 +100,15 @@ fleetctl.list_unit_files(function(err, unit_files){
73
100
74
101
** submit**
75
102
``` javascript
103
+ /**
104
+ * Upload one or more units to the cluster without starting them
105
+ * @method
106
+ * @param {string} /{array} paths of file to submit
107
+ * @param {function} callback function
108
+ *
109
+ * @callback
110
+ * @param {error} error object
111
+ */
76
112
fleetctl .submit ([" unit1" , " unit2" ], function (err ){
77
113
if (err)
78
114
throw err;
@@ -81,6 +117,16 @@ fleetctl.submit(["unit1", "unit2"], function(err){
81
117
82
118
** load**
83
119
``` javascript
120
+ /**
121
+ * Schedule one or more units in the cluster, first submitting them if necessary
122
+ * @method
123
+ * @param {string} /{array} unit name
124
+ * @param {object} [optional] options
125
+ * @param {function} callback function
126
+ *
127
+ * @callback
128
+ * @param {error} error object
129
+ */
84
130
fleetctl .load ([" unit1" , " unit2" ], function (err ){
85
131
if (err)
86
132
throw err;
@@ -89,6 +135,16 @@ fleetctl.load(["unit1", "unit2"], function(err){
89
135
90
136
** unload**
91
137
``` javascript
138
+ /**
139
+ * Unschedule one or more units in the cluster
140
+ * @method
141
+ * @param {string} /{array} unit name
142
+ * @param {object} [optional] options
143
+ * @param {function} callback function
144
+ *
145
+ * @callback
146
+ * @param {error} error object
147
+ */
92
148
fleetctl .unload (" unit1" , function (err ){
93
149
if (err)
94
150
throw err;
@@ -97,6 +153,16 @@ fleetctl.unload("unit1", function(err){
97
153
98
154
** start**
99
155
``` javascript
156
+ /**
157
+ * Instruct systemd to start one or more units in the cluster, first submitting and loading if necessary
158
+ * @method
159
+ * @param {string} /{array} unit name
160
+ * @param {object} [optional] options
161
+ * @param {function} callback function
162
+ *
163
+ * @callback
164
+ * @param {error} error object
165
+ */
100
166
fleetctl .start (" unit1" , function (err ){
101
167
if (err)
102
168
throw err;
@@ -105,6 +171,16 @@ fleetctl.start("unit1", function(err){
105
171
106
172
** stop**
107
173
``` javascript
174
+ /**
175
+ * Instruct systemd to stop one or more units in the cluster
176
+ * @method
177
+ * @param {string} /{array} unit name
178
+ * @param {object} [optional] options
179
+ * @param {function} callback function
180
+ *
181
+ * @callback
182
+ * @param {error} error object
183
+ */
108
184
fleetctl .stop (" unit1" , {" no-block" : true }, function (err ){
109
185
if (err)
110
186
throw err;
@@ -113,6 +189,15 @@ fleetctl.stop("unit1", {"no-block": true}, function(err){
113
189
114
190
** destroy**
115
191
``` javascript
192
+ /**
193
+ * Destroy one or more units in the cluster
194
+ * @method
195
+ * @param {string} /{array} unit name
196
+ * @param {function} callback function
197
+ *
198
+ * @callback
199
+ * @param {error} error object
200
+ */
116
201
fleetctl .destroy (" unit1" , function (err ){
117
202
if (err)
118
203
throw err;
0 commit comments