Documentation ¶
Index ¶
- func CopyFile(src, dst string) error
- func GetAvailableSpace(path string) int64
- func GetAvailableSpaceBlock(deviceName string) int64
- func GetAvailableSpaceByVolumeMode(volumeMode v1.PersistentVolumeMode) int64
- func GetNamespace() string
- func MinQuantity(availableSpace, imageSize *resource.Quantity) resource.Quantity
- func ParseEnvVar(envVarName string, decode bool) (string, error)
- func RandAlphaNum(n int) string
- func StreamDataToFile(r io.Reader, fileName string) error
- func UnArchiveLocalTar(filePath, destDir string, arg ...string) error
- func UnArchiveTar(reader io.Reader, destDir string, arg ...string) error
- type CountingReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAvailableSpace ¶ added in v1.4.0
GetAvailableSpace gets the amount of available space at the path specified.
func GetAvailableSpaceBlock ¶ added in v1.8.0
GetAvailableSpaceBlock gets the amount of available space at the block device path specified.
func GetAvailableSpaceByVolumeMode ¶ added in v1.8.0
func GetAvailableSpaceByVolumeMode(volumeMode v1.PersistentVolumeMode) int64
GetAvailableSpaceByVolumeMode calls another method based on the volumeMode parameter to get the amount of available space at the path specified.
func GetNamespace ¶
func GetNamespace() string
GetNamespace returns the namespace the pod is executing in
func MinQuantity ¶ added in v1.4.0
MinQuantity calculates the minimum of two quantities.
func ParseEnvVar ¶ added in v1.4.0
ParseEnvVar provides a wrapper to attempt to fetch the specified env var
func RandAlphaNum ¶
RandAlphaNum provides an implementation to generate a random alpha numeric string of the specified length
func StreamDataToFile ¶ added in v1.9.0
StreamDataToFile provides a function to stream the specified io.Reader to the specified local file
func UnArchiveLocalTar ¶ added in v1.5.0
UnArchiveLocalTar unarchives a local tar file to the specified destination.
Types ¶
type CountingReader ¶ added in v1.4.0
type CountingReader struct { Reader io.ReadCloser Current uint64 }
CountingReader is a reader that keeps track of how much has been read
func (*CountingReader) Close ¶ added in v1.4.0
func (r *CountingReader) Close() error
Close closes the stream