dependents

package
v1.7.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2021 License: Apache-2.0 Imports: 5 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeletionBlockedDueToDependentsCondition

func DeletionBlockedDueToDependentsCondition(blocked bool, message string) cephv1.Condition

Types

type DependentList

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

A DependentList represents a list of dependents of a resource. Each dependent has a plural Kind and a list of names of dependent resources.

func NewDependentList

func NewDependentList() *DependentList

NewDependentList creates a new empty DependentList.

func (*DependentList) Add

func (d *DependentList) Add(pluralKind string, name string)

Add adds a dependent name for a plural Kind to the DependentList.

func (*DependentList) Empty

func (d *DependentList) Empty() bool

Empty returns true if the DependentList is empty or false otherwise.

func (*DependentList) OfPluralKind

func (d *DependentList) OfPluralKind(pluralKind string) []string

OfPluralKind returns the names of dependents of the Kind (plural), or an empty list if no dependents exist.

func (*DependentList) PluralKinds

func (d *DependentList) PluralKinds() []string

PluralKinds returns the plural Kinds that have dependents.

func (*DependentList) StringWithHeader

func (d *DependentList) StringWithHeader(headerFormat string, args ...interface{}) string

StringWithHeader outputs the dependent list as a pretty-printed string headed with the given formatting directive (followed by a colon). It outputs dependents in alphabetical order by the plural Kind. Example:

StringWithHeader("dependents of my %q", "mom")  -->
`dependents of my "mom": FirstResources: [name1], SecondResources: [name2 name2 name3]`

Jump to

Keyboard shortcuts

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