Documentation
¶
Index ¶
Constants ¶
const ( // DaemonPort is the port the daemon uses to accept connections DaemonPort = "4321" // DaemonMajorVersion current version of the daemon DaemonMajorVersion = 1 // DaemonMinorVersion current minor version of the daemon DaemonMinorVersion = 0 )
Variables ¶
This section is empty.
Functions ¶
func EnsureDaemon ¶
func EnsureDaemon() error
EnsureDaemon makes sure a daemon of the right version is up and running. This method will either panic or return after the daemon is up and running.
func Handshake ¶
Handshake connects and sends a handshake request to the daemon. Return the version of the daemon that answered.
func KillDaemon ¶
func KillDaemon()
KillDaemon will kill the process with the PID stored in the daemon.pid file
func SetVariables ¶
func SetVariables(seVariablesRequest session.SetVariableRequest) error
SetVariables sends variables to be set in the global session
func WriteDaemonPID ¶
func WriteDaemonPID() error
WriteDaemonPID writes the PID of the current process to a file in the go-http-cli process dir
Types ¶
type HandshakeResponse ¶
HandshakeResponse is the response sent by the daemon when someone is checking if it's up.
type RequestExecution ¶
type RequestExecution struct { RequestResponses []request.ExecutedRequestResponse ErrorMessage string }
RequestExecution is the response from the daemon when executing a request.
func ExecuteRequest ¶
func ExecuteRequest(executionContext request.ExecutionContext) (*RequestExecution, error)
ExecuteRequest request the daemon to execute a request