client

package
v0.0.0-...-8018142 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2021 License: MPL-2.0 Imports: 5 Imported by: 0

README

client

GoDoc

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

type HTTPClient struct {
	http.Client
	// contains filtered or unexported fields
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL