composed

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConnectionDetailsFetcher

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

APIConnectionDetailsFetcher fetches the connection secret of given composed resource if it has a connection secret reference.

func (*APIConnectionDetailsFetcher) Fetch

Fetch returns the connection secret details of composed resource.

type Composer

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

An Composer composes infrastructure resources in a Kubernetes API server.

func NewComposer

func NewComposer(kube client.Client, opts ...ComposerOption) *Composer

NewComposer returns a new Composer that composes infrastructure resources in a Kubernetes API server.

func (*Composer) Compose

Compose the supplied Composed resource into the supplied Composite resource using the supplied CompositeTemplate.

type ComposerOption

type ComposerOption func(*Composer)

ComposerOption configures the Composer object.

func WithClientApplicator

func WithClientApplicator(ca resource.ClientApplicator) ComposerOption

WithClientApplicator returns a ComposerOption that changes the ClientApplicator of Composer.

func WithConfigurator

func WithConfigurator(c Configurator) ComposerOption

WithConfigurator returns a ComposerOption that changes the Configurator of Composer.

func WithConnectionDetailFetcher

func WithConnectionDetailFetcher(cdf ConnectionDetailsFetcher) ComposerOption

WithConnectionDetailFetcher returns a ComposerOption that changes the ConnectionDetailsFetcher of Composer.

func WithOverlayApplicator

func WithOverlayApplicator(oa OverlayApplicator) ComposerOption

WithOverlayApplicator returns a ComposerOption that changes the OverlayApplicator of Composer.

type Configurator

type Configurator interface {
	Configure(cp resource.Composite, cd resource.Composed, t v1alpha1.ComposedTemplate) error
}

Configurator is used to configure the Composed resource.

type ConfigureFn

ConfigureFn is a function that implements Configurator interface.

func (ConfigureFn) Configure

Configure calls ConfigureFn.

type ConnectionDetailsFetcher

type ConnectionDetailsFetcher interface {
	Fetch(ctx context.Context, cd resource.Composed, t v1alpha1.ComposedTemplate) (managed.ConnectionDetails, error)
}

ConnectionDetailsFetcher fetches the connection details of the Composed resource.

type DefaultConfigurator

type DefaultConfigurator struct{}

DefaultConfigurator configures the composed resource with given raw template and metadata information from composite resource.

func (*DefaultConfigurator) Configure

Configure applies the raw template and sets name and generateName.

type DefaultOverlayApplicator

type DefaultOverlayApplicator struct{}

DefaultOverlayApplicator applies patches to the composed resource using the values on Composite resource and field bindings in ComposedTemplate.

func (*DefaultOverlayApplicator) Overlay

Overlay applies patches to composed resource.

type FetchFn

FetchFn is a function that implements the ConnectionDetailsFetcher interface.

func (FetchFn) Fetch

Fetch calls FetchFn.

type Observation

type Observation struct {
	Ref               corev1.ObjectReference
	ConnectionDetails managed.ConnectionDetails
	Ready             bool
}

Observation is the result of composed reconciliation.

type OverlayApplicator

type OverlayApplicator interface {
	Overlay(cp resource.Composite, cd resource.Composed, t v1alpha1.ComposedTemplate) error
}

OverlayApplicator is used to apply an overlay at each reconcile.

type OverlayFn

OverlayFn is a function that implements OverlayApplicator interface.

func (OverlayFn) Overlay

Overlay calls OverlayFn.

Jump to

Keyboard shortcuts

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