add REPL config, help, and document #12

Closed
wants to merge 7 commits into
from

Conversation

Projects
None yet
5 participants
Contributor

jeffbski commented Jan 16, 2013

Provide ability to configure REPL via config.

  • repl - where to have REPL listen, defaults to env.CLUSTER_MASTER_REPL || 'cluster-master-socket'
    • if repl is null or false - REPL is disabled and will not be started
    • if repl is string path - REPL will listen on unix domain socket to this path
    • if repl is an integer port - REPL will listen on TCP 0.0.0.0:port
    • if repl is an object with address and port, then REPL will listen on TCP address:PORT

Examples of configuring repl

var config = { repl: false }                       // disable REPL
var config = { repl: '/tmp/cluster-master-sock' }  // unix domain socket
var config = { repl: 3001 }                        // tcp socket 0.0.0.0:3001
var config = { repl: { address: '127.0.0.1', port: 3002 }}  // tcp 127.0.0.1:3002

Provide help command within the REPL

Document REPL use

mcculloughsean and others added some commits Jan 8, 2013

@mcculloughsean mcculloughsean Add info about the sweet REPL in the README
Describe how you use the REPL, how to change the path of the socket,
and lists commands you can use in the REPL
f554ef5
@jeffbski jeffbski add nc as possible client 4dedfd2
@jeffbski jeffbski add help to REPL and update README 754bd6c
@jeffbski jeffbski make REPL location configurable with options
Allow `repl` config option passed into clusterMaster constructor

* `repl` - where to have REPL listen, defaults to `env.CLUSTER_MASTER_REPL` || 'cluster-master-socket'
  * if `repl` is null or false - REPL is disabled and will not be started
  * if `repl` is string path - REPL will listen on unix domain socket to this path
  * if `repl` is an integer port - REPL will listen on TCP 0.0.0.0:port
  * if `repl` is an object with `address` and `port`, then REPL will listen on TCP address:PORT
5ed6ceb
@jeffbski jeffbski provide repl config examples 2becf97
@jeffbski jeffbski change REPL quit to stop
Since quit is a common command to exit certain
types of command shells, I felt it would be better
to use a different name for stopping the cluster,
since it would be easy to get confused and accidentally
shut down the cluster when simply wanting to exit the
REPL shell.

I switched the REPL command to stop() for a graceful
shutdown and a kill() for stopping hard.
bc6f53e
Contributor

mcculloughsean commented Jan 25, 2013

👍

@jeffbski jeffbski add .exit to list of REPL commands
Although Control-D can be used, for some users it would
be good for them to know that they can also just type
`.exit`
6bf801b

liamdon commented May 14, 2013

👍

tellnes commented Dec 9, 2013

👍

Contributor

jeffbski commented Dec 9, 2013

Since it had been a long time since this pull request was created and hadn't yet been merged, I finally published my fork in npm as cluster-master-ext so it would be available I npm.

My fork is at https//github.com/jeffbski/cluster-master

Owner

isaacs commented Dec 9, 2013

Sorry for the long delay. Landed and published as v0.2.0

isaacs closed this Dec 9, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment