updater

package
v0.19.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2025 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithAcceptedAlgorithms

func WithAcceptedAlgorithms(acceptedAlgorithms []string) func(*Client)

WithAcceptedAlgorithms allows to restrict the set of accepted algorithms which are used to build a delta.

func WithArtifactInspectors added in v0.18.0

func WithArtifactInspectors(inspectors []inspector.ArtifactInspector) func(client *Client)

WithArtifactInspectors configures a Client with a list of ArtifactInspector instances to be used for artifact inspection.

func WithBackoffStrategy added in v0.10.0

func WithBackoffStrategy(b backoff.Strategy) func(*Client)

WithBackoffStrategy adds ...

func WithContext added in v0.10.0

func WithContext(ctx context.Context) func(*Client)

WithContext adds a ctx to the client (e.g. for cancellation).

func WithCredential added in v0.11.0

func WithCredential(registry string, credential auth.Credential) func(*Client)

WithCredential adds registry scoped credentials to the client.

func WithDockerConfigPath

func WithDockerConfigPath(dockerConfigPath string) func(*Client)

WithDockerConfigPath adds a path to a docker config file to the client configuration. The file is used to load locally stored registry credentials.

func WithInsecureAllowHTTP added in v0.13.0

func WithInsecureAllowHTTP(insecureAllowHTTP bool) func(*Client)

WithInsecureAllowHTTP configures the clients to allow HTTP requests.

func WithInternalDirectory

func WithInternalDirectory(internalDirectory string) func(*Client)

WithInternalDirectory sets the client configurations local working directory. It stores things such as the updater's internal state.

func WithKeepOldDir added in v0.15.1

func WithKeepOldDir(keepOldDir bool) func(*Client)

WithKeepOldDir if set to true directories are not replaced, this is less robust.

func WithManifestValidators added in v0.18.0

func WithManifestValidators(validators []validator.ManifestValidator) func(client *Client)

WithManifestValidators adds a collection of validators to the client which inspect the manifest before fetching the artifact.

func WithOutputDirPermissions added in v0.19.1

func WithOutputDirPermissions(outputDirPermissions os.FileMode) func(*Client)

WithOutputDirPermissions allows users to control the permissions of the output directory.

func WithOutputDirectory

func WithOutputDirectory(outputDirectory string) func(*Client)

WithOutputDirectory adds a directory to which output files are written.

func WithRemoteURL

func WithRemoteURL(remoteURL string) func(*Client)

WithRemoteURL adds the URL of a Doras server to the client configuration.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is used to run delta updates in Doras.

func NewClient

func NewClient(options ...func(*Client)) (*Client, error)

NewClient creates a new Doras update client with the provided options.

func (*Client) Pull

func (c *Client) Pull(image string) error

Pull an image from the registry. This is just a wrapper around PullAsync that blocks until it succeeds or errors.

func (*Client) PullAsync

func (c *Client) PullAsync(target string) (exists bool, err error)

PullAsync Pull delta, but do not block if the delta has not been created yet. The result of the pull is according to the client configuration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL