tags

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 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 added in v0.5.4

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

BuildParamsToTagSpecification builds a TagSpecification for the specified resource type.

Types

type Builder added in v0.6.0

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

Builder is the interface for a tags builder.

func New added in v0.6.0

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 added in v0.6.0

func (b *Builder) Apply() error

Apply tags a resource with tags including the cluster tag.

func (*Builder) Ensure added in v0.6.0

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

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

type BuilderOption added in v0.6.0

type BuilderOption func(*Builder)

BuilderOption represents an option when creating a tags builder.

func WithEC2 added in v0.6.0

func WithEC2(ec2client ec2iface.EC2API) BuilderOption

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

func WithEKS added in v0.6.0

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