Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add documentation about the REPL #8

Open
wants to merge 1 commit into from

1 participant

@mcculloughsean

Describe how you use the REPL, how to change the path of the socket,
and list commands you can use in the REPL

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 8, 2013
  1. @mcculloughsean

    Add info about the sweet REPL in the README

    mcculloughsean authored
    Describe how you use the REPL, how to change the path of the socket,
    and lists commands you can use in the REPL
This page is out of date. Refresh to see the latest.
Showing with 28 additions and 0 deletions.
  1. +28 −0 README.md
View
28 README.md
@@ -89,3 +89,31 @@ The `exec`, `env`, `argv`, and `silent` configs are passed to the
the parent. Called in the context of the worker, so you can reply by
looking at `this`.
+## REPL
+
+Cluster-master provides a REPL into the master process so you can inspect
+the state of your cluster. By default the REPL is accessible by a socket
+written to the root of the directory, but you can override it with the
+`CLUSTER_MASTER_REPL` environment variable. You can access the REPL with
+[socat](http://www.dest-unreach.org/socat/) like so:
+
+```
+socat ./cluster-master-socket stdin
+```
+
+The REPL provides you with access to these objects or functions:
+
+* `repl`
+* `resize(n)`
+* `restart(cb)`
+* `quit()`
+* `cluster`
+* `size`
+* `connections`
+* `workers`
+* `select(pid)`
+* `pids`
+* `ages`
+* `states`
+* `debug`
+* `sock`
Something went wrong with that request. Please try again.