dependents

package
v0.0.0-...-48ff17a Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InReferencedNamespaceNameNamespace = inReferencedNamespace{}

InReferencedNamespaceNameNamespace is a ListOption to use the name of the referenced namespace for listing referents.

Example: A Secret references a Namespace. In this case, client.InNamespace will be produced with the value being the name of the referenced Namespace.

View Source
var InReferencedObjectNamespace = inReferencedObjectNamespace{}

InReferencedObjectNamespace is a ListOption to use the namespace of the referenced object for listing referents.

Example: A Secret references a ConfigMap. In this case, client.InNamespace will be produced with the value being the namespace name of the ConfigMap.

Functions

This section is empty.

Types

type ClientListOptions

type ClientListOptions []client.ListOption

func (ClientListOptions) ListOptions

func (o ClientListOptions) ListOptions(_ client.Object) []client.ListOption

type Dependent

type Dependent struct {
	ReferentType client.Object

	CachedReferencer Referencer
	LiveReferencer   Referencer

	Handler    handler.EventHandler
	Predicates []predicate.Predicate
}

type Dependents

type Dependents interface {
	Dependent(dependent Dependent)
	IsReferenced(ctx context.Context, referenced client.Object) (bool, error)
}

type FieldIndexerFuncPredicate

type FieldIndexerFuncPredicate struct {
	Field       string
	IndexerFunc client.IndexerFunc
}

func (*FieldIndexerFuncPredicate) Matches

func (f *FieldIndexerFuncPredicate) Matches(ctx context.Context, referenced, obj client.Object) (bool, error)

type FieldListOptions

type FieldListOptions struct {
	Field string
}

FieldListOptions is a ListOption that adds client.MatchingFields with the field set to the name of the referenced object and client.InNamespace with the value set to the namespace the referenced object is in, thus this makes the use of InReferencedObjectNamespace superfluous.

func (*FieldListOptions) ListOptions

func (f *FieldListOptions) ListOptions(referenced client.Object) []client.ListOption

type ListOption

type ListOption interface {
	ListOptions(referenced client.Object) []client.ListOption
}

type ListPredicate

type ListPredicate interface {
	Matches(ctx context.Context, referenced, obj client.Object) (bool, error)
}

type ListPredicateFunc

type ListPredicateFunc func(ctx context.Context, referenced, obj client.Object) (bool, error)

func (ListPredicateFunc) Matches

func (f ListPredicateFunc) Matches(ctx context.Context, referenced, obj client.Object) (bool, error)

type ListReferencer

type ListReferencer struct {
	ReferentType client.Object
	Options      []ListOption
	Predicates   []ListPredicate
	Live         bool
	// contains filtered or unexported fields
}

func (*ListReferencer) InjectAPIReader

func (r *ListReferencer) InjectAPIReader(apiReader client.Reader) error

func (*ListReferencer) InjectClient

func (r *ListReferencer) InjectClient(client client.Client) error

func (*ListReferencer) InjectFunc

func (r *ListReferencer) InjectFunc(f inject.Func) error

func (*ListReferencer) InjectScheme

func (r *ListReferencer) InjectScheme(scheme *runtime.Scheme) error

func (*ListReferencer) References

func (r *ListReferencer) References(ctx context.Context, referenced client.Object) (bool, error)

type Mixin

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

func (*Mixin) Dependent

func (d *Mixin) Dependent(dependent Dependent)

func (*Mixin) InjectFunc

func (d *Mixin) InjectFunc(f inject.Func) error

func (*Mixin) IsReferenced

func (d *Mixin) IsReferenced(ctx context.Context, referenced client.Object) (bool, error)

func (*Mixin) WatchDynamicReferences

func (d *Mixin) WatchDynamicReferences(b *builder.Builder, mgr ctrl.Manager) error

type Referencer

type Referencer interface {
	References(ctx context.Context, referenced client.Object) (bool, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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