mirror

package
v0.0.0-...-c53fdc3 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// CaBundleFilename defines the name of the file on disk
	CaBundleFilename = filepath.Join(mirrorConfigDir, "ca-bundle.crt")
)
View Source
var (
	// RegistriesConfFilename defines the name of the file on disk
	RegistriesConfFilename = filepath.Join(mirrorConfigDir, "registries.conf")
)

Functions

func GetMirrorFromRelease

func GetMirrorFromRelease(releaseImage string, registriesConfig *RegistriesConf) string

GetMirrorFromRelease gets the matching mirror configured for the releaseImage.

Types

type CaBundle

type CaBundle struct {
	File *asset.File
}

CaBundle generates the cetificate file for disconnected mirrors.

func (*CaBundle) Dependencies

func (*CaBundle) Dependencies() []asset.Asset

Dependencies returns all of the dependencies directly needed to generate the asset.

func (*CaBundle) Files

func (i *CaBundle) Files() []*asset.File

Files returns the files generated by the asset.

func (*CaBundle) Generate

func (i *CaBundle) Generate(dependencies asset.Parents) error

Generate generates the Mirror Registries certificate file from install-config.

func (*CaBundle) Load

func (i *CaBundle) Load(f asset.FileFetcher) (bool, error)

Load returns the Mirror Registries certificate file from the disk.

func (*CaBundle) Name

func (*CaBundle) Name() string

Name returns a human friendly name for the asset.

type RegistriesConf

type RegistriesConf struct {
	File         *asset.File
	Config       *sysregistriesv2.V2RegistriesConf
	MirrorConfig []RegistriesConfig
}

RegistriesConf generates the registries.conf file.

func (*RegistriesConf) Dependencies

func (*RegistriesConf) Dependencies() []asset.Asset

Dependencies returns all of the dependencies directly needed to generate the asset.

func (*RegistriesConf) Files

func (i *RegistriesConf) Files() []*asset.File

Files returns the files generated by the asset.

func (*RegistriesConf) Generate

func (i *RegistriesConf) Generate(dependencies asset.Parents) error

Generate generates the registries.conf file from install-config.

func (*RegistriesConf) Load

func (i *RegistriesConf) Load(f asset.FileFetcher) (bool, error)

Load returns RegistriesConf asset from the disk.

func (*RegistriesConf) Name

func (*RegistriesConf) Name() string

Name returns a human friendly name for the asset.

type RegistriesConfig

type RegistriesConfig struct {
	Location string
	Mirror   string
}

RegistriesConfig holds the data extracted from registries.conf

Jump to

Keyboard shortcuts

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