Documentation ¶
Index ¶
- Constants
- type AddIPParams
- type Client
- type ClientOpt
- type ErrNotFound
- type HTTPClient
- func (c HTTPClient) AddIP(ctx context.Context, ip string, params AddIPParams) (IP, error)
- func (c HTTPClient) Failover(ctx context.Context, id string) error
- func (c HTTPClient) GetIP(ctx context.Context, id string) (IP, error)
- func (c HTTPClient) ListIPs(ctx context.Context) ([]IP, error)
- func (c HTTPClient) RemoveIP(ctx context.Context, id string) error
- func (c HTTPClient) UpdateIP(ctx context.Context, id string, params UpdateIPParams) (IP, error)
- func (c HTTPClient) Version(ctx context.Context) (string, error)
- type IP
- type UpdateIPParams
Constants ¶
View Source
const ( Activated = "ACTIVATED" Standby = "STANDBY" Failing = "FAILING" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddIPParams ¶
type AddIPParams struct { HealthcheckInterval int `json:"healthcheck_interval"` Checks []models.Healthcheck `json:"checks"` }
type Client ¶
type Client interface { ListIPs(context.Context) ([]IP, error) GetIP(ctx context.Context, id string) (IP, error) AddIP(ctx context.Context, ip string, params AddIPParams) (IP, error) UpdateIP(ctx context.Context, id string, params UpdateIPParams) (IP, error) RemoveIP(ctx context.Context, id string) error Failover(ctx context.Context, id string) error Version(context.Context) (string, error) }
type ErrNotFound ¶
type ErrNotFound struct {
// contains filtered or unexported fields
}
func (ErrNotFound) Error ¶
func (e ErrNotFound) Error() string
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func NewHTTPClient(opts ...ClientOpt) HTTPClient
func (HTTPClient) AddIP ¶
func (c HTTPClient) AddIP(ctx context.Context, ip string, params AddIPParams) (IP, error)
func (HTTPClient) UpdateIP ¶
func (c HTTPClient) UpdateIP(ctx context.Context, id string, params UpdateIPParams) (IP, error)
type UpdateIPParams ¶
type UpdateIPParams struct {
Healthchecks []models.Healthcheck `json:"healthchecks"`
}
Click to show internal directories.
Click to hide internal directories.