Documentation
¶
Index ¶
- func GetAvailableSpace(path string) 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 StartPrometheusEndpoint(certsDirectory string)
- type CountingReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAvailableSpace ¶ added in v1.4.1
GetAvailableSpace gets 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.1
MinQuantity calculates the minimum of two quantities.
func ParseEnvVar ¶ added in v1.4.1
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 StartPrometheusEndpoint ¶ added in v1.4.1
func StartPrometheusEndpoint(certsDirectory string)
StartPrometheusEndpoint starts an http server providing a prometheus endpoint using the passed in directory to store the self signed certificates that will be generated before starting the http server.
Types ¶
type CountingReader ¶ added in v1.4.1
type CountingReader struct {
Reader io.ReadCloser
Current int64
}
CountingReader is a reader that keeps track of how much has been read
func (*CountingReader) Close ¶ added in v1.4.1
func (r *CountingReader) Close() error
Close closes the stream
func (*CountingReader) Read ¶ added in v1.4.1
func (r *CountingReader) Read(p []byte) (n int, err error)
Read reads bytes from the stream and updates the prometheus clone_progress metric according to the progress.
Source Files
¶
- prometheus.go
- util.go