Documentation ¶
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) 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
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 *fnv1beta1.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) 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