Documentation ¶
Overview ¶
Package daemon implements the fleet long running daemon.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct {
Message string `json:"message"`
}
APIError is an error response.
type APIResponse ¶
type APIResponse struct {
Error *APIError `json:"error,omitempty"`
}
APIResponse is the response to an API request.
type Daemon ¶
type Daemon interface { Start(ctx context.Context) error Stop(ctx context.Context) error Install(ctx context.Context, url string) error StartExperiment(ctx context.Context, url string) error StopExperiment(ctx context.Context, pkg string) error PromoteExperiment(ctx context.Context, pkg string) error GetPackage(pkg string, version string) (Package, error) GetState() (map[string]repository.State, error) }
Daemon is the fleet daemon in charge of remote install, updates and configuration.
type LocalAPIClient ¶
type LocalAPIClient interface { Status() (StatusResponse, error) Install(pkg, version string) error StartExperiment(pkg, version string) error StopExperiment(pkg string) error PromoteExperiment(pkg string) error }
LocalAPIClient is a client to interact with the locally exposed daemon API.
func NewLocalAPIClient ¶
func NewLocalAPIClient(runPath string) LocalAPIClient
NewLocalAPIClient returns a new LocalAPIClient.
type Package ¶
type Package struct { Name string `json:"package"` Version string `json:"version"` SHA256 string `json:"sha256"` URL string `json:"url"` Size int64 `json:"size"` Platform string `json:"platform"` Arch string `json:"arch"` }
Package represents a downloadable package.
type StatusResponse ¶
type StatusResponse struct { APIResponse Version string `json:"version"` Packages map[string]repository.State `json:"packages"` }
StatusResponse is the response to the status endpoint.
Click to show internal directories.
Click to hide internal directories.