Documentation
¶
Index ¶
- type Client
- func (c *Client) GetJob(ctx context.Context, jobID string) (*Job, error)
- func (c *Client) Health(ctx context.Context) error
- func (c *Client) Ready(ctx context.Context) error
- func (c *Client) SetUserAgent(userAgent string)
- func (c *Client) StartContainers(ctx context.Context, timeout int, ignore []string) (*JobResponse, error)
- func (c *Client) StopContainers(ctx context.Context, timeout int, ignore []string) (*JobResponse, error)
- func (c *Client) StopContainersForShutdown(ctx context.Context, timeout int, ignore []string) (*JobResponse, error)
- func (c *Client) WaitForJob(ctx context.Context, jobID string, pollInterval time.Duration) (*Job, error)
- func (c *Client) WaitForServerReady(ctx context.Context, timeout time.Duration) error
- type ContainerResult
- type HTTPError
- type HealthResponse
- type Job
- type JobRequest
- type JobResponse
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 represents an HTTP client for communicating with the controller server
func (*Client) Ready ¶ added in v1.0.7
Ready checks operational readiness and falls back to the v1 liveness route.
func (*Client) SetUserAgent ¶ added in v1.0.4
SetUserAgent sets a custom User-Agent header for requests
func (*Client) StartContainers ¶
func (c *Client) StartContainers(ctx context.Context, timeout int, ignore []string) (*JobResponse, error)
StartContainers submits a job to start containers
func (*Client) StopContainers ¶
func (c *Client) StopContainers(ctx context.Context, timeout int, ignore []string) (*JobResponse, error)
StopContainers submits a job to stop containers
func (*Client) StopContainersForShutdown ¶ added in v1.0.7
func (c *Client) StopContainersForShutdown(ctx context.Context, timeout int, ignore []string) (*JobResponse, error)
StopContainersForShutdown submits the stop operation that gates helper shutdown.
type ContainerResult ¶ added in v1.0.7
type HealthResponse ¶
type HealthResponse struct {
Status string `json:"status"`
}
HealthResponse represents the health check response
type Job ¶
type Job struct {
ID string `json:"id"`
Type string `json:"type"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
StartedAt time.Time `json:"started_at"`
EndedAt time.Time `json:"ended_at"`
Timeout int `json:"timeout"`
Ignore []string `json:"ignore,omitempty"`
Started []string `json:"started,omitempty"`
Stopped []string `json:"stopped,omitempty"`
Skipped []string `json:"skipped,omitempty"`
Failed []string `json:"failed,omitempty"`
Outcomes []ContainerResult `json:"outcomes,omitempty"`
Error string `json:"error,omitempty"`
}
Job represents a job's full state
type JobRequest ¶
type JobRequest struct {
Timeout int `json:"timeout"`
Ignore []string `json:"ignore,omitempty"`
Shutdown bool `json:"shutdown,omitempty"`
}
JobRequest represents a request to start or stop containers
type JobResponse ¶
JobResponse represents a job creation response
Click to show internal directories.
Click to hide internal directories.