Documentation
¶
Overview ¶
this file has been autogenerated by "go generate". Do not edit it manually
Index ¶
- type Resource
- type Resources
- func (r Resources) AllHaveExternalNamesSet() bool
- func (r Resources) DesiredComposedResources() map[resource.Name]*resource.DesiredComposed
- func (r Resources) DesiredExternalNames() map[string]string
- func (r Resources) DesiredResourcesCompositionNames() []string
- func (r Resources) EnsureExternalNameTags(externalNameTag string) error
- func (r Resources) ForEachDesiredComposed(fn func(desiredComposed Resource) error) error
- func (r Resources) FoundExistingResources() bool
- func (r Resources) LenDesired() int
- func (r Resources) LenObserved() int
- func (r Resources) ObservedExternalNames() map[string]string
- func (r Resources) SetDesiredExternalName(composedName string, name string) error
- func (r *Resources) TreatEquivalentEmptyExternalNames(byGroupKind map[string][]string)
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 ¶
CompositionName returns the composed resource's name as defined in the composition
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 *fnv1.RunFunctionRequest) (Resources, error)
NewResources creates Resources based on req
func (Resources) AllHaveExternalNamesSet ¶
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 ¶
DesiredExternalNames returns a map of external names indexed by the desired composed resource name on the composition
func (Resources) DesiredResourcesCompositionNames ¶
DesiredResourcesCompositionNames returns a list of composed resource's name as defined in their composition. Not to be confused with their .metadata.name
func (Resources) EnsureExternalNameTags ¶
EnsureExternalNameTags copies over values from the external-name annotation in observed resources to desired resources' .spec.forProvider.tag if the desired resource supports it.
func (Resources) ForEachDesiredComposed ¶
ForEachDesiredComposed executes the given fn passing each desired composed resource as input
func (Resources) FoundExistingResources ¶
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 ¶
LenDesired returns how many desired composed resources there are
func (Resources) LenObserved ¶
LenObserved returns how many observed composed resources there are
func (Resources) ObservedExternalNames ¶
ObservedExternalNames returns a map of all observed external names, indexed by the resource name on the composition
func (Resources) SetDesiredExternalName ¶
SetDesiredExternalName sets the external name annotation to the desired composed resource matching the given composedName argument
func (*Resources) TreatEquivalentEmptyExternalNames ¶
TreatEquivalentEmptyExternalNames clears in-memory observed external names that match configured placeholder values for the resource's GroupKind (same string as GroupKind()). Used before EnsureExternalNameTags and AllHaveExternalNamesSet. Map keys are compared case-insensitively to GroupKind(); each value list is usually a single placeholder string.