Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUpdateNotAvailable = status.New(status.UpdateExecError, "A chef-automate CLI is not available")
ErrUpdateNotAvailable is returned when no versions are available
Functions ¶
This section is empty.
Types ¶
type UpdateSource ¶
type UpdateSource interface { // DesiredVersion returns the version the update source thinks we should be // running DesiredVersion(ctx context.Context) (string, error) // FetchLatest returns the binary for the latest executable along with the // version. Because of time, the version returned in DesiredVersion can end // up being different than what FetchLatest says the version is. FetchLatest(ctx context.Context) ([]byte, string, error) }
UpdateSource describes a place where we can get a version and executable
func DeploymentService ¶
func DeploymentService(cliUpdaterClient api.DeploymentClient) UpdateSource
DeploymentService returns an UpdateSource that knows how to fetch the desired version and executable binary from the deployment-service
func Local ¶
func Local(executableCache executablecache.ExecutableCache) UpdateSource
Local returns an UpdateSource that only knows how to check for available updates that are locally cached using the ExecutableCache. This UpdateSource is used for making sure we start off by running the latest executable we have
Click to show internal directories.
Click to hide internal directories.