reconciler

package
v0.0.0-...-9516177 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateResources

func UpdateResources(ctx context.Context, reconciler Reconciler, client clientapi.Client) error

UpdateResources updates all resources known to this cluster reconciler if they are dirty

Types

type Inquirer

type Inquirer struct {
	ReconciledComponent *component.Component
	Reconciler          Reconciler
}

Inquirer allows to retrieve information about the cluster

func (*Inquirer) Cluster

func (inquirer *Inquirer) Cluster() *cluster.Cluster

Cluster returns the current cluster in reconciliation

func (*Inquirer) ClusterComponents

func (inquirer *Inquirer) ClusterComponents(role component.Role) component.List

ClusterComponents returns a list of components with the provided role for the current cluster in reconciliation

func (*Inquirer) Component

func (inquirer *Inquirer) Component() *component.Component

Component returns the current component in reconciliation

func (*Inquirer) ComponentHypervisor

func (inquirer *Inquirer) ComponentHypervisor(component *component.Component) *infra.Hypervisor

ComponentHypervisor returns the hypervisor where the provided component is located

func (*Inquirer) Hypervisor

func (inquirer *Inquirer) Hypervisor() *infra.Hypervisor

Hypervisor returns the current hypervisor in reconciliation

type ReconcileErrors

type ReconcileErrors map[string][]error

ReconcileErrors represents a fine grained report of the series of errors that happened during a reconciliation cycle

func (ReconcileErrors) AddClusterError

func (reconcileErrors ReconcileErrors) AddClusterError(clusterNamespace, clusterName string, err error)

AddClusterError adds a cluster-level error

func (ReconcileErrors) AddComponentError

func (reconcileErrors ReconcileErrors) AddComponentError(clusterNamespace, clusterName, componentName string, err error)

AddComponentError adds a component-level error

func (ReconcileErrors) Error

func (reconcileErrors ReconcileErrors) Error() string

Error returns the errors that happened during this reconciliation cycle in string format

func (ReconcileErrors) IsClusterErrorFree

func (reconcileErrors ReconcileErrors) IsClusterErrorFree(clusterNamespace, clusterName string) bool

IsClusterErrorFree returns whether the cluster provided has at least one error

type Reconciler

type Reconciler interface {
	HypervisorMap() infra.HypervisorMap
	ClusterMap() cluster.Map
	ComponentList() component.List
}

Reconciler represents a queryable data structure where hypervisors, clusters and components can be retrieved from

Jump to

Keyboard shortcuts

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