Skip to content
Permalink
Browse files

[api] Add `Servers#listCluster` API

  • Loading branch information...
mmalecki committed Apr 24, 2013
1 parent cf2bad7 commit 7ceff359ba564988c0046897958bbd5e2645e3ee
Showing with 16 additions and 1 deletion.
  1. +16 −1 node.js/lib/client/servers.js
@@ -221,4 +221,19 @@ Servers.prototype.tagged = function (options, callback) {
}, callback, function (res, result) {
callback(null, result.servers);
});
};
};

//
// ### function listCluster (cluster, callback)
// #### @cluster {string} Cluster name
// #### @callback {function} Continuation to respond to.
// Respods with all servers in cluster `cluster`.
//
Servers.prototype.listCluster = function (cluster, callback) {
this._request({
method: 'GET',
path: '/clusters/' + (cluster.name || cluster) + '/servers'
}, callback, function (res, result) {
callback(null, result.servers);
});
};

0 comments on commit 7ceff35

Please sign in to comment.
You can’t perform that action at this time.