region

package
v14.21.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package region implements an operatorkit resource that addresses a problem where the tcnp resource would need to fetch the Cluster CR even though the MachineDeployment CR is reconciled. This is only because we need the AWS region to lookup S3 bucket names and EC2 image IDs and the like. So in order to free the tcnp resource from that hustle we implement a separate region resource which does the lookup and puts the region into the controller context. The controller context information are then simply used by the tcnp resource as this is our state of the art primitive for information distribution within a controller's reconciliation.

Index

Constants

View Source
const (
	Name = "region"
)

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

Types

type Config

type Config struct {
	Logger        micrologger.Logger
	ToClusterFunc func(ctx context.Context, v interface{}) (infrastructurev1alpha3.AWSCluster, error)
}

type Resource

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

func New

func New(config Config) (*Resource, error)

func (*Resource) EnsureCreated

func (r *Resource) EnsureCreated(ctx context.Context, obj interface{}) error

func (*Resource) EnsureDeleted

func (r *Resource) EnsureDeleted(ctx context.Context, obj interface{}) error

func (*Resource) Name

func (r *Resource) Name() string

Jump to

Keyboard shortcuts

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