cloud

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterObject

type ClusterObject interface {
	conditions.Setter
}

ClusterObject represents a AWS cluster object.

type ClusterScoper

type ClusterScoper interface {
	Logger
	Session
	ScopeUsage

	// Name returns the CAPI cluster name.
	Name() string
	// Namespace returns the cluster namespace.
	Namespace() string
	// AWSClusterName returns the AWS cluster name.
	InfraClusterName() string
	// Region returns the cluster region.
	Region() string
	// KubernetesClusterName is the name of the Kubernetes cluster. For EKS this
	// will differ to the CAPI cluster name
	KubernetesClusterName() string

	// InfraCluster returns the AWS infrastructure cluster object.
	InfraCluster() ClusterObject

	// Cluster returns the cluster object.
	ClusterObj() ClusterObject

	// IdentityRef returns the AWS infrastructure cluster identityRef.
	IdentityRef() *infrav1.AWSIdentityReference

	// ListOptionsLabelSelector returns a ListOptions with a label selector for clusterName.
	ListOptionsLabelSelector() client.ListOption
	// APIServerPort returns the port to use when communicating with the API server.
	APIServerPort() int32
	// AdditionalTags returns any tags that you would like to attach to AWS resources. The returned value will never be nil.
	AdditionalTags() infrav1.Tags
	// SetFailureDomain sets the infrastructure provider failure domain key to the spec given as input.
	SetFailureDomain(id string, spec clusterv1.FailureDomainSpec)

	// PatchObject persists the cluster configuration and status.
	PatchObject() error
	// Close closes the current scope persisting the cluster configuration and status.
	Close() error
}

ClusterScoper is the interface for a cluster scope.

type Logger added in v1.1.0

type Logger interface {
	// Enabled tests whether this Logger is enabled.  For example, commandline
	// flags might be used to set the logging verbosity and disable some info
	// logs.
	Enabled() bool

	// Info logs a non-error message with the given key/value pairs as context.
	//
	// The msg argument should be used to add some constant description to
	// the log line.  The key/value pairs can then be used to add additional
	// variable information.  The key/value pairs should alternate string
	// keys and arbitrary values.
	Info(msg string, keysAndValues ...interface{})

	// Error logs an error, with the given message and key/value pairs as context.
	// It functions similarly to calling Info with the "error" named value, but may
	// have unique behavior, and should be preferred for logging errors (see the
	// package documentations for more information).
	//
	// The msg field should be used to add context to any underlying error,
	// while the err field should be used to attach the actual error that
	// triggered this log line, if present.
	Error(err error, msg string, keysAndValues ...interface{})

	// V returns a Logger value for a specific verbosity level, relative to
	// this Logger.  In other words, V values are additive.  V higher verbosity
	// level means a log message is less important.  It's illegal to pass a log
	// level less than zero.
	V(level int) logr.Logger

	// WithValues adds some key-value pairs of context to a logger.
	// See Info for documentation on how key/value pairs work.
	WithValues(keysAndValues ...interface{}) logr.Logger

	// WithName adds a new element to the logger's name.
	// Successive calls with WithName continue to append
	// suffixes to the logger's name.  It's strongly recommended
	// that name segments contain only letters, digits, and hyphens
	// (see the package documentation for more information).
	WithName(name string) logr.Logger
}

Logger represents the ability to log messages, both errors and not.

type ScopeUsage

type ScopeUsage interface {
	// ControllerName returns the name of the controller that created the scope
	ControllerName() string
}

ScopeUsage is used to indicate which controller is using a scope.

type Session

type Session interface {
	Session() awsclient.ConfigProvider
	ServiceLimiter(string) *throttle.ServiceLimiter
}

Session represents an AWS session.

Directories

Path Synopsis
autoscaling/mock_autoscalingiface
Package mock_autoscalingiface is a generated GoMock package.
Package mock_autoscalingiface is a generated GoMock package.
ec2
eks
eks/mock_eksiface
Package mock_eksiface is a generated GoMock package.
Package mock_eksiface is a generated GoMock package.
elb
gc
iamauth/mock_iamauth
Package mock_iamauth is a generated GoMock package.
Package mock_iamauth is a generated GoMock package.
instancestate/mock_eventbridgeiface
Package mock_eventbridgeiface is a generated GoMock package.
Package mock_eventbridgeiface is a generated GoMock package.
instancestate/mock_sqsiface
Package mock_sqsiface is a generated GoMock package.
Package mock_sqsiface is a generated GoMock package.
mock_services
Package mock_services is a generated GoMock package.
Package mock_services is a generated GoMock package.
s3
s3/mock_s3iface
Run go generate to regenerate this mock.
Run go generate to regenerate this mock.
s3/mock_stsiface
Run go generate to regenerate this mock.
Run go generate to regenerate this mock.
secretsmanager/mock_secretsmanageriface
Package mock_secretsmanageriface is a generated GoMock package.
Package mock_secretsmanageriface is a generated GoMock package.
ssm
ssm/mock_ssmiface
Package mock_ssmiface is a generated GoMock package.
Package mock_ssmiface is a generated GoMock package.
sts/mock_stsiface
Package mock_stsiface is a generated GoMock package.
Package mock_stsiface is a generated GoMock package.

Jump to

Keyboard shortcuts

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