Skip to content

Commit 6457376

Browse files
author
Jared De La Cruz
committed
function descriptions
1 parent a572e9d commit 6457376

File tree

1 file changed

+85
-0
lines changed

1 file changed

+85
-0
lines changed

README.md

+85
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ The following fleetctl sub-commands are available in this module:
4343

4444
**list-machines**
4545
```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+
*/
4655
fleetctl.list_machines(function(err, machines){
4756
if(err)
4857
throw err;
@@ -53,6 +62,15 @@ fleetctl.list_machines(function(err, machines){
5362

5463
**list-units**
5564
```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+
*/
5674
fleetctl.list_units(function(err, units){
5775
if(err)
5876
throw err;
@@ -63,6 +81,15 @@ fleetctl.list_units(function(err, units){
6381

6482
**list-unit-files**
6583
```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+
*/
6693
fleetctl.list_unit_files(function(err, unit_files){
6794
if(err)
6895
throw err;
@@ -73,6 +100,15 @@ fleetctl.list_unit_files(function(err, unit_files){
73100

74101
**submit**
75102
```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+
*/
76112
fleetctl.submit(["unit1", "unit2"], function(err){
77113
if(err)
78114
throw err;
@@ -81,6 +117,16 @@ fleetctl.submit(["unit1", "unit2"], function(err){
81117

82118
**load**
83119
```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+
*/
84130
fleetctl.load(["unit1", "unit2"], function(err){
85131
if(err)
86132
throw err;
@@ -89,6 +135,16 @@ fleetctl.load(["unit1", "unit2"], function(err){
89135

90136
**unload**
91137
```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+
*/
92148
fleetctl.unload("unit1", function(err){
93149
if(err)
94150
throw err;
@@ -97,6 +153,16 @@ fleetctl.unload("unit1", function(err){
97153

98154
**start**
99155
```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+
*/
100166
fleetctl.start("unit1", function(err){
101167
if(err)
102168
throw err;
@@ -105,6 +171,16 @@ fleetctl.start("unit1", function(err){
105171

106172
**stop**
107173
```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+
*/
108184
fleetctl.stop("unit1", {"no-block": true}, function(err){
109185
if(err)
110186
throw err;
@@ -113,6 +189,15 @@ fleetctl.stop("unit1", {"no-block": true}, function(err){
113189

114190
**destroy**
115191
```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+
*/
116201
fleetctl.destroy("unit1", function(err){
117202
if(err)
118203
throw err;

0 commit comments

Comments
 (0)