Documentation ¶
Index ¶
- Constants
- func DownloadImageFile(baseURL string, applicationName string) (string, error)
- func DownloadImageFileWithSha(baseURL string, applicationName string, sha256Checksum string) (string, error)
- func GetCacheDir(dataType, applicationName string) (string, error)
- func GetFileFromCache(fileName string, cacheDir string) (string, error)
Constants ¶
View Source
const ( // InstallerApplicationName is to use as application name by installer. InstallerApplicationName = "openshift-installer" // AgentApplicationName is to use as application name used by agent. AgentApplicationName = "agent" // ImageDataType is used by installer. ImageDataType = "image" // FilesDataType is used by agent. FilesDataType = "files" )
Variables ¶
This section is empty.
Functions ¶
func DownloadImageFile ¶
DownloadImageFile is a helper function that obtains an image file from a given URL, puts it in the cache and returns the local file path. If the file is compressed by a known compressor, the file is uncompressed prior to being returned.
func DownloadImageFileWithSha ¶ added in v0.90.0
func DownloadImageFileWithSha(baseURL string, applicationName string, sha256Checksum string) (string, error)
DownloadImageFileWithSha sets the sha256Checksum which is checked on download.
func GetCacheDir ¶
GetCacheDir returns a local path of the cache, where the installer should put the data: <user_cache_dir>/agent/<dataType>_cache If the directory doesn't exist, it will be automatically created.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.