Documentation
¶
Index ¶
- func WithAcceptedAlgorithms(acceptedAlgorithms []string) func(*Client)
- func WithDockerConfigPath(dockerConfigPath string) func(*Client)
- func WithInternalDirectory(internalDirectory string) func(*Client)
- func WithOutputDirectory(outputDirectory string) func(*Client)
- func WithRemoteURL(remoteURL string) func(*Client)
- type Client
- type DorasState
- type Patcher
- type RegistryDelegate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithAcceptedAlgorithms ¶
WithAcceptedAlgorithms allows to restrict the set of accepted algorithms which are used to build a delta.
func WithDockerConfigPath ¶
WithDockerConfigPath adds a path to a docker config file to the client configuration. The file is used to load locally stored registry credentials.
func WithInternalDirectory ¶
WithInternalDirectory sets the client configurations local working directory. It stores things such as the updaters internal state.
func WithOutputDirectory ¶
WithOutputDirectory adds a directory to which output files are written.
func WithRemoteURL ¶
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.
type DorasState ¶
type DorasState interface {
// GetCurrentImage returns the current OCI image that is in use/rolled out.
GetCurrentImage() (string, error)
// SetCurrentImage to the new OCI image that is from now in use/rolled out.
SetCurrentImage(image string) error
}
DorasState is an interface that can be used to get/set the internal state of a Doras update client.
type Patcher ¶
type Patcher interface {
// PatchFile located at the path with the provided delta.
PatchFile(fPath string, delta io.Reader) error
// PatchDirectory located at the path with the provided delta.
PatchDirectory(fPath string, delta io.Reader)
}
Patcher handles patching files or directories for provided deltas.
type RegistryDelegate ¶
type RegistryDelegate interface {
ResolveAndLoad(image string) (ociutils.Manifest, io.ReadCloser, error)
}
RegistryDelegate is used to load artifacts from a registry. This should handle partial downloads if possible.