Documentation
¶
Overview ¶
Package dataplaneapi provides a client for interacting with the haproxy dataplane api
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrDataPlaneNotReady is returned dataplaneapi fails to return a 200 ErrDataPlaneNotReady = errors.New("dataplaneapi failed to become ready") ErrDataPlaneHTTPUnauthorized = errors.New("dataplaneapi received unauthorized request") // ErrDataPlaneHTTPError is returned when the http response is an error ErrDataPlaneHTTPError = errors.New("dataplaneapi http error") // ErrDataPlaneConfigInvalid is returned when the config is invalid ErrDataPlaneConfigInvalid = errors.New("dataplaneapi config is invalid") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the http client for Data Plane API
func (*Client) APIIsReady ¶
APIIsReady returns true when a 200 is returned for a GET request to the Data Plane API
func (Client) CheckConfig ¶
CheckConfig validates the proposed config without applying it
func (*Client) PostConfig ¶
PostConfig pushes a new haproxy config in plain text using basic auth
type Option ¶ added in v0.0.10
type Option func(c *Client)
Option configures a connection option.
func WithLogger ¶ added in v0.0.10
func WithLogger(logger *zap.SugaredLogger) Option
WithLogger sets the logger for the client
Click to show internal directories.
Click to hide internal directories.