tags

package
v2.1.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrBuildParamsRequired defines an error for when no build params are supplied.
	ErrBuildParamsRequired = errors.New("no build params supplied")

	// ErrApplyFuncRequired defines an error for when tags are not supplied.
	ErrApplyFuncRequired = errors.New("no tags apply function supplied")
)

Functions

func BuildParamsToTagSpecification

func BuildParamsToTagSpecification(ec2ResourceType string, params infrav1.BuildParams) *ec2.TagSpecification

BuildParamsToTagSpecification builds a TagSpecification for the specified resource type.

Types

type Builder

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

Builder is the interface for a tags builder.

func New

func New(params *infrav1.BuildParams, opts ...BuilderOption) *Builder

New creates a new TagsBuilder with the specified build parameters and with optional configuration.

func (*Builder) Apply

func (b *Builder) Apply() error

Apply tags a resource with tags including the cluster tag.

func (*Builder) Ensure

func (b *Builder) Ensure(current infrav1.Tags) error

Ensure applies the tags if the current tags differ from the params.

type BuilderOption

type BuilderOption func(*Builder)

BuilderOption represents an option when creating a tags builder.

func WithEC2

func WithEC2(ec2client ec2iface.EC2API) BuilderOption

WithEC2 is used to denote that the tags builder will be using EC2.

func WithEKS

func WithEKS(eksclient eksiface.EKSAPI) BuilderOption

WithEKS is used to specify that the tags builder will be targeting EKS.

Jump to

Keyboard shortcuts

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