Documentation ¶
Overview ¶
Package client provides a HTTP client used to send commands to the ContainerPilot control socket
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPClient ¶
HTTPClient provides a properly configured http.Client object used to send requests out to a ContainerPilot process's control socket.
func NewHTTPClient ¶
func NewHTTPClient(socketPath string) (*HTTPClient, error)
NewHTTPClient initializes an client.HTTPClient object by configuring it's socketPath for HTTP communication through the local file system.
func (HTTPClient) GetPing ¶
func (c HTTPClient) GetPing() error
GetPing make a request to the ping endpoint of the ContainerPilot control socket, to verify it's listening
func (HTTPClient) PutEnv ¶
func (c HTTPClient) PutEnv(body string) error
PutEnv makes a request to the environ endpoint of a ContainerPilot process for setting environ variable pairs.
func (HTTPClient) PutMetric ¶
func (c HTTPClient) PutMetric(body string) error
PutMetric makes a request to the metric endpoint of a ContainerPilot process for setting custom metrics.
func (HTTPClient) Reload ¶
func (c HTTPClient) Reload() error
Reload makes a request to the reload endpoint of a ContainerPilot process.
func (HTTPClient) SetMaintenance ¶
func (c HTTPClient) SetMaintenance(isEnabled bool) error
SetMaintenance makes a request to either the enable or disable maintenance endpoint of a ContainerPilot process.