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) 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) TryGetLock(ctx context.Context, id string) error
- func (c HTTPClient) Version(ctx context.Context) (string, error)
- type IP
Constants ¶
View Source
const ( Activated = "ACTIVATED" Standby = "STANDBY" Failing = "FAILING" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddIPParams ¶ added in v1.8.0
type AddIPParams struct { HealthcheckInterval int `json:"healthcheck_interval"` KeepaliveInterval int `json:"keepalive_interval"` Checks []models.Healthcheck `json:"checks"` }
type Client ¶
type Client interface { ListIPs(ctx context.Context) ([]IP, error) GetIP(ctx context.Context, id string) (IP, error) AddIP(ctx context.Context, ip string, params AddIPParams) (IP, error) RemoveIP(ctx context.Context, id string) error TryGetLock(ctx context.Context, id string) error Version(ctx context.Context) (string, error) }
type ErrNotFound ¶ added in v1.1.0
type ErrNotFound struct {
// contains filtered or unexported fields
}
func (ErrNotFound) Error ¶ added in v1.1.0
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) TryGetLock ¶
func (c HTTPClient) TryGetLock(ctx context.Context, id string) error
Click to show internal directories.
Click to hide internal directories.