Documentation ¶
Index ¶
- func DescribePVCs(pvcPrefix, namespace string)
- func WaitOnDeleted(pvcPrefix, namespace string, sleep, timeout time.Duration) (bool, error)
- type GetAllByPrefixResult
- type GetResult
- type List
- type Metadata
- type PersistentVolumeClaim
- func CreatePVCFromFileDeleteIfExist(filename, name, namespace string) (*PersistentVolumeClaim, error)
- func CreatePersistentVolumeClaimsFromFile(filename, name, namespace string) (*PersistentVolumeClaim, error)
- func Get(pvcName, namespace string) (*PersistentVolumeClaim, error)
- func GetAllByPrefix(prefix, namespace string) ([]PersistentVolumeClaim, error)
- type Spec
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DescribePVCs ¶ added in v0.41.0
func DescribePVCs(pvcPrefix, namespace string)
DescribePVCs describes all pvcs whose name matches a substring
Types ¶
type GetAllByPrefixResult ¶ added in v0.41.0
type GetAllByPrefixResult struct {
// contains filtered or unexported fields
}
GetAllByPrefixResult is a return struct for GetAllByPrefixAsync
func GetAllByPrefixAsync ¶ added in v0.41.0
func GetAllByPrefixAsync(prefix, namespace string) GetAllByPrefixResult
GetAllByPrefixAsync wraps Get with a struct response for goroutine + channel usage
type GetResult ¶ added in v0.41.0
type GetResult struct {
// contains filtered or unexported fields
}
GetResult is a return struct for GetAsync
type List ¶ added in v0.36.0
type List struct {
PersistentVolumeClaims []PersistentVolumeClaim `json:"items"`
}
type Metadata ¶
type Metadata struct { CreatedAt time.Time `json:"creationTimestamp"` Name string `json:"name"` Namespace string `json:"namespace"` }
Metadata holds information like name, create time, and namespace
type PersistentVolumeClaim ¶ added in v0.36.0
type PersistentVolumeClaim struct { Metadata Metadata `json:"metadata"` Spec Spec `json:"spec"` Status Status `json:"status"` }
PersistentVolumeClaim is used to parse data from kubectl get pvc
func CreatePVCFromFileDeleteIfExist ¶ added in v0.36.0
func CreatePVCFromFileDeleteIfExist(filename, name, namespace string) (*PersistentVolumeClaim, error)
CreatePVCFromFileDeleteIfExist will create a PVC from file with a name
func CreatePersistentVolumeClaimsFromFile ¶
func CreatePersistentVolumeClaimsFromFile(filename, name, namespace string) (*PersistentVolumeClaim, error)
CreatePersistentVolumeClaimsFromFile will create a PVC from file with a name
func Get ¶
func Get(pvcName, namespace string) (*PersistentVolumeClaim, error)
Get will return a PersistentVolumeClaim with a given name and namespace
func GetAllByPrefix ¶ added in v0.36.0
func GetAllByPrefix(prefix, namespace string) ([]PersistentVolumeClaim, error)
GetAllByPrefix will return all pvcs in a given namespace that match a prefix
func (*PersistentVolumeClaim) Delete ¶ added in v0.36.0
func (pvc *PersistentVolumeClaim) Delete(retries int) error
Delete will delete a PersistentVolumeClaim in a given namespace
func (*PersistentVolumeClaim) Describe ¶ added in v0.41.0
func (pvc *PersistentVolumeClaim) Describe() error
Describe will describe a pv resource
func (*PersistentVolumeClaim) WaitOnReady ¶ added in v0.36.0
func (pvc *PersistentVolumeClaim) WaitOnReady(namespace string, sleep, timeout time.Duration) (bool, error)
WaitOnReady will block until PersistentVolumeClaim is available