Circuit Self-managed infrastructure, programmatic monitoring and orchestration

Example: Using server elements

Server elements are interfaces to the circuit daemons that comprise the cluster. They provide information about the daemon, as well as the ability to merge two disconnected circuit clusters.

Let us go through an example. First, take a look at what servers are available:

	circuit ls /...

Pick X88550014d4c82e4d, for instance. The peek command will give you basic information about the daemon at this path, including its circuit address and the time it was started:

	# circuit peek /X88550014d4c82e4d
	    "Addr": "circuit://",
	    "Joined": "2015-03-18T13:35:08.217020207-04:00"

The stack trace command will print the Go stack trace of the running circuit daemon:

	# circuit stk /X88550014d4c82e4d

Finally, using the join command, we can instruct the circuit daemon underlying the path /X88550014d4c82e4d to merge the cluster that it is a part of with the cluster that contains a given circuit daemon, specified by its circuit address. (A circuit address provides a way of connecting to a circuit daemon directly.)

	# circuit join /X88550014d4c82e4d circuit://

This command will instruct the circuit daemon underlying /X88550014d4c82e4d to perform networking operations that will result in joining this circuit cluster with the circuit cluster that the target address circuit:// is a part of. If the target is already a member of this cluster, no change will occur.