downloader

package
v1.66.4 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDevVersion = "dev"
)

Variables

This section is empty.

Functions

func DockerCFGForModules added in v1.65.0

func DockerCFGForModules(repo, dockercfg string) string

DockerCFGForModules according to the deckhouse docs, for anonymous registry access we must have the value: {"auths": { "<PROXY_REGISTRY>": {}}} but it could be empty for a ModuleSource. modules are not ready to catch empty string, so we have to fill it with the default value

func InjectRegistryToModuleValues added in v1.58.0

func InjectRegistryToModuleValues(moduleVersionPath string, moduleSource *v1alpha1.ModuleSource) error

Types

type DownloadStatistic added in v1.59.0

type DownloadStatistic struct {
	Size         uint32
	PullDuration time.Duration
}

type ModuleDownloadResult

type ModuleDownloadResult struct {
	Checksum      string
	ModuleVersion string
	ModuleWeight  uint32

	ModuleDefinition *models.DeckhouseModuleDefinition
	Changelog        map[string]any
}

type ModuleDownloader

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

func NewModuleDownloader

func NewModuleDownloader(dc dependency.Container, downloadedModulesDir string, ms *v1alpha1.ModuleSource, registryOptions []cr.Option) *ModuleDownloader

func (*ModuleDownloader) DownloadByModuleVersion

func (md *ModuleDownloader) DownloadByModuleVersion(moduleName, moduleVersion string) (*DownloadStatistic, error)

func (*ModuleDownloader) DownloadDevImageTag

func (md *ModuleDownloader) DownloadDevImageTag(moduleName, imageTag, checksum string) (string, *models.DeckhouseModuleDefinition, error)

DownloadDevImageTag downloads image tag and store it in the .../<moduleName>/dev fs path if checksum is equal to a module image digest - do nothing otherwise return new digest

func (*ModuleDownloader) DownloadMetadataFromReleaseChannel

func (md *ModuleDownloader) DownloadMetadataFromReleaseChannel(moduleName, releaseChannel, moduleChecksum string) (ModuleDownloadResult, error)

DownloadMetadataFromReleaseChannel downloads only module release image with metadata: version.json, checksum.json(soon) does not fetch and install the desired version on the module, only fetches its module definition

func (*ModuleDownloader) DownloadModuleDefinitionByVersion added in v1.60.0

func (md *ModuleDownloader) DownloadModuleDefinitionByVersion(moduleName, moduleVersion string) (*models.DeckhouseModuleDefinition, error)

DownloadModuleDefinitionByVersion returns a module definition from the repo by the module's name and version(tag)

func (*ModuleDownloader) GetDocumentationArchive added in v1.58.0

func (md *ModuleDownloader) GetDocumentationArchive(moduleName, moduleVersion string) (io.ReadCloser, error)

type ModuleReleaseMetadata added in v1.65.0

type ModuleReleaseMetadata struct {
	Version *semver.Version `json:"version"`

	Changelog map[string]any
}

Jump to

Keyboard shortcuts

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