k8svolume

package
v1.3.0-RC2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder is the builder object for Volume

func NewBuilder

func NewBuilder() *Builder

NewBuilder returns new instance of Builder

func (*Builder) Build

func (b *Builder) Build() (*corev1.Volume, error)

Build returns the Volume API instance

func (*Builder) WithEmptyDir

func (b *Builder) WithEmptyDir(dir *corev1.EmptyDirVolumeSource) *Builder

WithEmptyDir sets the EmptyDir field of the Volume with provided dir

func (*Builder) WithHostDirectory

func (b *Builder) WithHostDirectory(path string) *Builder

WithHostDirectory sets the VolumeSource field of Volume with provided hostpath as type directory.

func (*Builder) WithHostPathAndType

func (b *Builder) WithHostPathAndType(
	dirpath string,
	dirtype *corev1.HostPathType,
) *Builder

WithHostPathAndType sets the VolumeSource field of Volume with provided hostpath as directory path and type as directory type

func (*Builder) WithName

func (b *Builder) WithName(name string) *Builder

WithName sets the Name field of Volume with provided value.

func (*Builder) WithPVCSource

func (b *Builder) WithPVCSource(pvcName string) *Builder

WithPVCSource sets the Volume field of Volume with provided pvc

type Predicate

type Predicate func(*Volume) bool

Predicate defines an abstraction to determine conditional checks against the provided volume instance

func IsNil

func IsNil() Predicate

IsNil is predicate to filter out nil Volume instances

type PredicateList

type PredicateList []Predicate

PredicateList holds a list of predicate

type Volume

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

Volume is a wrapper over named volume api object, used within Pods. It provides build, validations and other common logic to be used by various feature specific callers.

func NewForAPIObject

func NewForAPIObject(obj *corev1.Volume, opts ...volumeBuildOption) *Volume

NewForAPIObject returns a new instance of Volume

func (*Volume) IsNil

func (v *Volume) IsNil() bool

IsNil returns true if the Volume instance is nil

Jump to

Keyboard shortcuts

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