persistentvolumeclaims

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 PersistentVolumeClaims

type PersistentVolumeClaims struct {
	Metadata Metadata `json:"metadata"`
	Spec     Spec     `json:"spec"`
	Status   Status   `json:"status"`
}

PersistentVolumeClaims is used to parse data from kubectl get pvc

func CreatePersistentVolumeClaimsFromFile

func CreatePersistentVolumeClaimsFromFile(filename, name, namespace string) (*PersistentVolumeClaims, error)

CreatePersistentVolumeClaimsFromFile will create a StorageClass from file with a name

func Get

func Get(pvcName, namespace string) (*PersistentVolumeClaims, error)

Get will return a PersistentVolumeClaims with a given name and namespace

func (*PersistentVolumeClaims) WaitOnReady

func (pvc *PersistentVolumeClaims) WaitOnReady(namespace string, sleep, duration time.Duration) (bool, error)

WaitOnReady will block until PersistentVolumeClaims is available

type Spec

type Spec struct {
	StorageClassName string `json:"storageClassName"`
	VolumeName       string `json:"volumeName"`
}

Spec holds information like storageClassName, volumeName

type Status

type Status struct {
	Phase string `json:"phase"`
}

Status holds information like phase

Jump to

Keyboard shortcuts

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