internal

package
v0.0.0-...-075cf79 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resource

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

Resource represents a single managed resource, be it observed or desired

func (Resource) CompositionName

func (r Resource) CompositionName() string

CompositionName returns the composed resource's name as defined in the composition

func (Resource) GroupKind

func (r Resource) GroupKind() string

GroupKind returns the composed resource's group-kind as lower-case string (eg, 'securitygroups.ec2.aws.upbound.io')

func (Resource) K8sName

func (r Resource) K8sName() string

K8sName returns the composed resource's name on Kubernetes, its .metadata.name

type Resources

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

Resources aggregates desired and observed managed resources from a request

func NewResources

func NewResources(req *fnv1beta1.RunFunctionRequest) (Resources, error)

NewResources creates Resources based on req

func (Resources) AllHaveExternalNamesSet

func (r Resources) AllHaveExternalNamesSet() bool

AllHaveExternalNamesSet returns true if all observed composed resources have the external-name annotation set.

func (Resources) DesiredComposedResources

func (r Resources) DesiredComposedResources() map[resource.Name]*resource.DesiredComposed

DesiredComposedResources returns the up-to-date desired composed resources as expected by the composition-function SDK

func (Resources) DesiredExternalNames

func (r Resources) DesiredExternalNames() map[string]string

DesiredExternalNames returns a map of external names indexed by the desired composed resource name on the composition

func (Resources) DesiredResourcesCompositionNames

func (r Resources) DesiredResourcesCompositionNames() []string

DesiredResourcesCompositionNames returns a list of composed resource's name as defined in their composition. Not to be confused with their .metadata.name

func (Resources) ForEachDesiredComposed

func (r Resources) ForEachDesiredComposed(fn func(desiredComposed Resource) error) error

ForEachDesiredComposed executes the given fn passing each desired composed resource as input

func (Resources) FoundExistingResources

func (r Resources) FoundExistingResources() bool

FoundExistingResources detects whether existing external resources have been found so far based on the existence of an external name in each of them. Returns true if at least one desired composed resource has its external name set

func (Resources) LenDesired

func (r Resources) LenDesired() int

LenDesired returns how many desired composed resources there are

func (Resources) LenObserved

func (r Resources) LenObserved() int

LenObserved returns how many observed composed resources there are

func (Resources) ObservedExternalNames

func (r Resources) ObservedExternalNames() map[string]string

ObservedExternalNames returns a map of all observed external names, indexed by the resource name on the composition

func (Resources) SetDesiredExternalName

func (r Resources) SetDesiredExternalName(composedName string, name string) error

SetDesiredExternalName sets the external name annotation to the desired composed resource matching the given composedName argument

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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