Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NextExecutable ¶
NextExecutable represents the next command to execute when self upgrading. If one is not available, Available() will return false
func (*NextExecutable) Available ¶
func (nextExe *NextExecutable) Available() bool
Available returns true if a next executable can be run
func (*NextExecutable) ReExec ¶
func (nextExe *NextExecutable) ReExec(extraEnv []string) error
ReExec runs the next executable and exits. This function panics if a a next executable is not available. It is the caller's responsibility to verify that with the Available() function
type SelfUpdater ¶
type SelfUpdater interface { // NextExecutable returns the next executable to exec if one is available. // One not being available is not considered an error NextExecutable(ctx context.Context) (NextExecutable, error) }
SelfUpdater gets the updated executables
func NewSelfUpdater ¶
func NewSelfUpdater(updateSource updatesource.UpdateSource, executableCache executablecache.ExecutableCache) SelfUpdater
NewSelfUpdater returns a new self updater. It will fetch updates from the update source and store them in the given executable cache
Click to show internal directories.
Click to hide internal directories.