pvc

package
v2.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadSubVolumePathFromMeta

func ReadSubVolumePathFromMeta(path string) (string, error)

func ResolveSubVolumeName

func ResolveSubVolumeName(pv *v1.PersistentVolume) (string, error)

Types

type Collection

type Collection struct {
	// contains filtered or unexported fields
}

func Collect

func Collect(ctx context.Context, cephConfig *config.CephFs, options ...collector.ConfigManipulator) (*Collection, error)

Collect PVC objects lazy ensure to provide a K8s API in the given context

func (*Collection) Add

func (v *Collection) Add(obj runtime.Object) error

func (*Collection) All

func (v *Collection) All() map[Key]*Value

All returns a new copy of the pvc collection for safe iteration

func (*Collection) Delete

func (v *Collection) Delete(obj runtime.Object) error

func (*Collection) Filter

func (v *Collection) Filter(filter func(key Key, value *Value) bool) map[Key]*Value

Filter will return a filtered copy of the pvc collection for save iteration

func (*Collection) Modify

func (v *Collection) Modify(obj runtime.Object) error

type Key

type Key struct {
	Key       string
	Namespace string
}

type Value

type Value struct {
	Error          error
	FullVolumePath string
	PVC            *coreV1.PersistentVolumeClaim

	// Note: PV can be nil, e.g for unbound PVCs
	PV *coreV1.PersistentVolume
}

Jump to

Keyboard shortcuts

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