Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteServiceCmd ¶
ExecuteServiceCmd will execute the specified service-related command for the Tendermint service on this machine. This requires the `outage-sim-server` process to be running as root, and requires the OS to have a `service` command (such as CentOS, Ubuntu or Debian).
func IsTendermintRunning ¶
func IsTendermintRunning() bool
IsTendermintRunning attempts to check whether there is a process called "tendermint" currently running on the system.
func MakeOutageEndpointHandler ¶
func MakeOutageEndpointHandler( username, passwordHash string, isTendermintRunningFn func() bool, executeServiceCmdFn func(string) error, ) func(http.ResponseWriter, *http.Request)
MakeOutageEndpointHandler creates an HTTP handler for dealing with the incoming up/down requests to bring the Tendermint service up or down. Sending a POST request to the server with either "up" or "down" in the body of the request will attempt to bring the Tendermint service up or down accordingly.
Types ¶
This section is empty.