plugin

package
v0.0.0-...-baf26c3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(out io.Writer, pvcs []corev1.PersistentVolumeClaim)

func FormatPvcDetail

func FormatPvcDetail(out io.Writer, status *PvcStatus)

Types

type Node

type Node struct {
	Name string
}

func NewNode

func NewNode(n *corev1.Node) *Node

type PVStatus

type PVStatus struct {
	Name               string
	AttachedVolumeName string
}

type Pod

type Pod struct {
	Name      string
	Volume    string
	Node      string
	PodStatus corev1.PodPhase
}

func NewPod

func NewPod(p *corev1.Pod, vol string) *Pod

type PvcContext

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

func NewPvcContext

func NewPvcContext(streams genericclioptions.IOStreams) *PvcContext

func (*PvcContext) Complete

func (p *PvcContext) Complete(namespace string) (err error)

func (*PvcContext) GetNamespace

func (p *PvcContext) GetNamespace() string

func (*PvcContext) GetPvcDetail

func (p *PvcContext) GetPvcDetail(pvcname string) (*PvcStatus, error)

func (*PvcContext) ListPvcs

func (p *PvcContext) ListPvcs() (pvcs []corev1.PersistentVolumeClaim, err error)

func (*PvcContext) ListPvcsByPod

func (p *PvcContext) ListPvcsByPod(podname string) (pvcs []corev1.PersistentVolumeClaim, err error)

type PvcPhase

type PvcPhase struct {
	Name   PvcPhaseName
	Status PvcPhaseStatus
	Detail string
}

type PvcPhaseName

type PvcPhaseName string
const (
	PvcProvision PvcPhaseName = "Provision"
	PvcBind      PvcPhaseName = "Bind"
	PvcAttach    PvcPhaseName = "Attach"
	PvcMount     PvcPhaseName = "Mount"
)

type PvcPhaseStatus

type PvcPhaseStatus string
const (
	PvcPhaseSuccess    PvcPhaseStatus = "success"
	PvcPhaseFail       PvcPhaseStatus = "fail"
	PvcPhasePartlyFail PvcPhaseStatus = "partly fail"
	PvcPhaseOndoing    PvcPhaseStatus = "ondoing"
)

type PvcStatus

type PvcStatus struct {
	Name     string
	PVStatus *PVStatus
	Nodes    []*Node
	Pods     []*Pod
	Phases   map[PvcPhaseName]*PvcPhase
}

Jump to

Keyboard shortcuts

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