Documentation
¶
Index ¶
- func CompareStringNaturalOrder(a, b string) bool
- func GetMountPointIndex(pattern, name, mountPoint string) int
- func GetNamePrefix(am discoblocksondatiov1.AvailabilityMode, uniquePerConfig string) string
- func Hash(s string) (uint32, error)
- func IsContainsAll(a, b map[string]string) bool
- func NewPVC(config *discoblocksondatiov1.DiskConfig, prefix string, driver *drivers.Driver) (*corev1.PersistentVolumeClaim, error)
- func ParseCapacity(capacity string) (uint16, string, error)
- func ParsePrometheusMetric(metric string) (map[string]*dto.MetricFamily, error)
- func ParsePrometheusMetricValue(metric string) (float64, error)
- func RenderDiskConfigLabel(name string) string
- func RenderFinalizer(name string, extras ...string) string
- func RenderHostJob(pvcName, namespace, nodeName, dev, fs, mountPoint string, ...) (*batchv1.Job, error)
- func RenderMetricsService(name, namespace string) (*corev1.Service, error)
- func RenderMetricsSidecar() (*corev1.Container, error)
- func RenderMountPoint(pattern, name string, index int) string
- func RenderResourceName(prefix bool, elems ...string) (string, error)
- func WaitForSemaphore(ctx context.Context, sem Semaphore, errChan chan<- error) (func(), error)
- type Semaphore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareStringNaturalOrder ¶ added in v0.0.5
CompareStringNaturalOrder compares string in natural order
func GetMountPointIndex ¶ added in v0.0.5
GetMountPointIndex calculates index by mount point
func GetNamePrefix ¶ added in v0.0.5
func GetNamePrefix(am discoblocksondatiov1.AvailabilityMode, uniquePerConfig string) string
GetNamePrefix returns the prefix by availability type
func IsContainsAll ¶
IsContainsAll finds for a contains all b
func NewPVC ¶ added in v0.0.5
func NewPVC(config *discoblocksondatiov1.DiskConfig, prefix string, driver *drivers.Driver) (*corev1.PersistentVolumeClaim, error)
NewPVC constructs a new PVC instance
func ParsePrometheusMetric ¶ added in v0.0.2
func ParsePrometheusMetric(metric string) (map[string]*dto.MetricFamily, error)
ParsePrometheusMetric parses Prometheus metrisc details
func ParsePrometheusMetricValue ¶ added in v0.0.2
ParsePrometheusMetricValue parses Prometheus metrisc value
func RenderDiskConfigLabel ¶ added in v0.0.5
RenderDiskConfigLabel renders DiskConfig label
func RenderFinalizer ¶
RenderFinalizer calculates finalizer name
func RenderHostJob ¶ added in v0.0.5
func RenderHostJob(pvcName, namespace, nodeName, dev, fs, mountPoint string, containerIDs []string, getCommand func() (string, error)) (*batchv1.Job, error)
RenderHostJob returns the job executed on host
func RenderMetricsService ¶ added in v0.0.2
RenderMetricsService returns the metrics service
func RenderMetricsSidecar ¶ added in v0.0.2
RenderMetricsSidecar returns the metrics sidecar
func RenderMountPoint ¶
RenderMountPoint calculates mount point
func RenderResourceName ¶ added in v0.0.5
RenderResourceName calculates resource name