MXS-1390: Add detailed MaxCtrl documentation

Added a more detailed description for commands that needed it.
This commit is contained in:
Markus Mäkelä
2017-09-06 10:36:32 +03:00
parent f189de47a3
commit c8490df566
16 changed files with 241 additions and 53 deletions

View File

@ -35,10 +35,21 @@ exports.desc = 'Link objects'
exports.handler = function() {}
exports.builder = function(yargs) {
yargs
.command('service <name> <server...>', 'Link servers to a service', {}, function(argv) {
.command('service <name> <server...>', 'Link servers to a service', function(yargs) {
return yargs.epilog('This command links servers to a service, making them available ' +
'for any connections that use the service. Before a server is ' +
'linked to a service, it should be linked to a monitor so that ' +
'the server state is up to date. Newly linked server are only ' +
'available to new connections, existing connections will use the ' +
'old list of servers.');
}, function(argv) {
addServer(argv, 'services/' + argv.name, argv.server)
})
.command('monitor <name> <server...>', 'Link servers to a monitor', {}, function(argv) {
.command('monitor <name> <server...>', 'Link servers to a monitor', function(yargs) {
return yargs.epilog('Linking a server to a monitor will add it to the list of servers ' +
'that are monitored by that monitor. A server can be monitored by ' +
'only one monitor at a time.');
}, function(argv) {
addServer(argv, 'monitors/' + argv.name, argv.server)
})
.usage('Usage: link <command>')