Documentation
¶
Overview ¶
Package client implements FleetLock client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client holds the params related to the host in order to interact with the FleetLock server URL.
func New ¶
func New(baseServerURL, group, id string, c HTTPClient) (*Client, error)
New builds a FleetLock client.
func (*Client) RecursiveLock ¶
RecursiveLock tries to reserve (lock) a slot for rebooting.
type Error ¶
type Error struct {
// Kind is the error type identifier.
Kind string `json:"kind"`
// Value is a human-friendly error description.
Value string `json:"value"`
}
Error is the type returned by FleetLock in case StatusCode is different from 200.
type HTTPClient ¶
type HTTPClient interface {
// Do send a `body` payload to the URL.
Do(*http.Request) (*http.Response, error)
}
HTTPClient interface holds the required Post method to send FleetLock requests.
Click to show internal directories.
Click to hide internal directories.