updater

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2025 License: Apache-2.0 Imports: 31 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 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 updaters 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 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