Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Combined ¶ added in v0.29.0
type Combined []combinedSet
Combined is a type for functions that expect a list of input sets that have already been combined according to an input strategy. The type is to emphasize this expectation for callers, e.g. builder.BuildResourceSet().
func Combine ¶ added in v0.29.0
func Combine(rset *fluxcdv1.ResourceSet, providerMap map[ProviderKey]fluxcdv1.InputProvider) (Combined, error)
Combine combines the inputs from the given ResourceSet and the given map of input providers according to the input strategy defined in the ResourceSet spec.
func ToCombined ¶ added in v0.29.0
ToCombined converts a slice of maps to the Combined type.
type Flattener ¶ added in v0.29.0
type Flattener struct {
// contains filtered or unexported fields
}
Flattener is a strategy that flattens the inputs from multiple providers into a single list by concatenating them.
func NewFlattener ¶ added in v0.29.0
func NewFlattener() *Flattener
NewFlattener returns a new initialized *Flattener.
func (*Flattener) AddProvider ¶ added in v0.29.0
AddProvider adds the inputs from a provider to the flattener.
type NormalizedKey ¶ added in v0.29.0
type NormalizedKey string
NormalizedKey is a type alias for string that represents a normalized key for use in templates.
func NormalizeKeyForTemplate ¶ added in v0.29.0
func NormalizeKeyForTemplate(key string) NormalizedKey
NormalizeKeyForTemplate normalizes the given string to a consistent format for use as a key in maps fed to Go templates.
We convert uppercase letters to lowercase, replace spaces and punctuation with '_', and remove any characters not in [a-z0-9_]. Then we split the words by '_' and join only the resulting non-empty words back together with '_'.
type Permuter ¶ added in v0.29.0
type Permuter struct {
// contains filtered or unexported fields
}
Permuter accumulates a series of input provider objects and their respective list of exported inputs and generates the permutation L_1 x L_2 x ... x L_n, where L_i is the list of inputs exported by the i-th provider.
func NewPermuter ¶ added in v0.29.0
func NewPermuter(opts ...PermuterOption) *Permuter
NewPermuter returns a new initialized *Permuter.
func (*Permuter) AddProvider ¶ added in v0.29.0
AddProvider accumulates the given input provider object and its exported inputs. If permutations have already been generated, the state is not mutated.
type PermuterOption ¶ added in v0.29.0
type PermuterOption func(*Permuter)
PermuterOption is a functional option for configuring the Permuter.
func WithIncludeEmptyProviders ¶ added in v0.29.0
func WithIncludeEmptyProviders() PermuterOption
WithIncludeEmptyProviders configures the Permuter to include input providers that do not export any inputs when generating permutations. This allows generating an empty permutation when at least one provider has no inputs.
type ProviderKey ¶
type ProviderKey struct {
GVK schema.GroupVersionKind
Name string
Namespace string
}
ProviderKey is the key used to identify input providers.
func NewProviderKey ¶
func NewProviderKey(provider fluxcdv1.InputProvider) ProviderKey
NewProviderKey returns the key for the input provider.