indexer

package
v0.0.0-...-05c4727 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDistributionClassRef

func GetDistributionClassRef(distro api.Distribution) api.ObjectReference

Returns the DistributionClassRef for the given Distribution

func GetSecretRef

func GetSecretRef(distro api.Distribution) string

Returns the secret name for the given Distribution

If TLS is not specified, an empty string is returned.

func NewIndexer

func NewIndexer(mgr ctrl.Manager, key string, indexer IndexerFunc)

Indexes a new field on Distributions with the given index key and using the given IndexerFunc to extract the field

In the event that the IndexerFunc returns an emtpty string, no fields will be indexed.

func NewObjectReferenceIndexer

func NewObjectReferenceIndexer(mgr ctrl.Manager, kind string, indexer ObjReference)

Indexes a new Object Reference field on Distributions

If the ObjectReference is blank, or is not for the given type, an empty string is returned. Otherwise the Object Reference's name is returned.

func SetUpDistributionIndexers

func SetUpDistributionIndexers(mgr ctrl.Manager)

Sets up the field indexes for Distribution resources

These are: - DistributionClasses referenced in DistributionClassRef - ClusterDistributionClasses referenced in DistributionClassRef - Secrets referenced in TLS.SecretRef

Types

type IndexerFunc

type IndexerFunc func(api.Distribution) string

Returns the value of a field for a given Distribution to be used by the FieldIndexer

This is a more specific func of the client.IndexerFunc, tailored to a kubernetes-compatible single key, and Distribution resources.

type ObjReference

type ObjReference func(api.Distribution) api.ObjectReference

Returns the ObjectReference value of a field for a given Distribution to be used by the FieldIndexer

This is a more specific func of the IndexerFunc above, tailored for fields with ObjectReference values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳