resourcetypes

package
v0.0.0-...-cdb346d Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ENI

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

func NewENI

func NewENI(ec2Client *ec2.Client) *ENI

func (*ENI) Cleanup

func (e *ENI) Cleanup(ctx context.Context, ids []string) ([]string, error)

Cleanup any old ENIs that were managed by Karpenter or were provisioned as part of testing We execute these in serial since we will most likely get rate limited if we try to delete these too aggressively

func (*ENI) CountAll

func (e *ENI) CountAll(ctx context.Context) (count int, err error)

func (*ENI) Get

func (e *ENI) Get(ctx context.Context, clusterName string) (ids []string, err error)

func (*ENI) GetExpired

func (e *ENI) GetExpired(ctx context.Context, expirationTime time.Time, excludedClusters []string) (ids []string, err error)

func (*ENI) Global

func (e *ENI) Global() bool

func (*ENI) String

func (e *ENI) String() string

type Instance

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

func NewInstance

func NewInstance(ec2Client *ec2.Client) *Instance

func (*Instance) Cleanup

func (i *Instance) Cleanup(ctx context.Context, ids []string) ([]string, error)

Cleanup any old instances that were managed by Karpenter or were provisioned as part of testing

func (*Instance) CountAll

func (i *Instance) CountAll(ctx context.Context) (count int, err error)

func (*Instance) Get

func (i *Instance) Get(ctx context.Context, clusterName string) (ids []string, err error)

func (*Instance) GetExpired

func (i *Instance) GetExpired(ctx context.Context, expirationTime time.Time, excludedClusters []string) (ids []string, err error)

func (*Instance) Global

func (i *Instance) Global() bool

func (*Instance) String

func (i *Instance) String() string

type InstanceProfile

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

func NewInstanceProfile

func NewInstanceProfile(iamClient *iam.Client) *InstanceProfile

func (*InstanceProfile) Cleanup

func (ip *InstanceProfile) Cleanup(ctx context.Context, names []string) ([]string, error)

Cleanup any old instance profiles that were managed by Karpenter or were provisioned as part of testing We execute these in serial since we will most likely get rate limited if we try to delete these too aggressively

func (*InstanceProfile) CountAll

func (ip *InstanceProfile) CountAll(ctx context.Context) (count int, err error)

func (*InstanceProfile) Get

func (ip *InstanceProfile) Get(ctx context.Context, clusterName string) (names []string, err error)

func (*InstanceProfile) GetExpired

func (ip *InstanceProfile) GetExpired(ctx context.Context, expirationTime time.Time, excludedClusters []string) (names []string, err error)

func (*InstanceProfile) Global

func (ip *InstanceProfile) Global() bool

func (*InstanceProfile) String

func (ip *InstanceProfile) String() string

type LaunchTemplate

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

func NewLaunchTemplate

func NewLaunchTemplate(ec2Client *ec2.Client) *LaunchTemplate

func (*LaunchTemplate) Cleanup

func (lt *LaunchTemplate) Cleanup(ctx context.Context, names []string) ([]string, error)

Cleanup any old launch templates that were managed by Karpenter or were provisioned as part of testing We execute these in serial since we will most likely get rate limited if we try to delete these too aggressively

func (*LaunchTemplate) CountAll

func (lt *LaunchTemplate) CountAll(ctx context.Context) (count int, err error)

func (*LaunchTemplate) Get

func (lt *LaunchTemplate) Get(ctx context.Context, clusterName string) (names []string, err error)

func (*LaunchTemplate) GetExpired

func (lt *LaunchTemplate) GetExpired(ctx context.Context, expirationTime time.Time, excludedClusters []string) (names []string, err error)

func (*LaunchTemplate) Global

func (lt *LaunchTemplate) Global() bool

func (*LaunchTemplate) String

func (lt *LaunchTemplate) String() string

type OIDC

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

func NewOIDC

func NewOIDC(iamClient *iam.Client) *OIDC

func (*OIDC) Cleanup

func (o *OIDC) Cleanup(ctx context.Context, arns []string) ([]string, error)

Cleanup any old OIDC providers that were are remaining as part of testing We execute these in serial since we will most likely get rate limited if we try to delete these too aggressively

func (*OIDC) CountAll

func (o *OIDC) CountAll(ctx context.Context) (count int, err error)

func (*OIDC) Get

func (o *OIDC) Get(ctx context.Context, clusterName string) (names []string, err error)

func (*OIDC) GetExpired

func (o *OIDC) GetExpired(ctx context.Context, expirationTime time.Time, excludedClusters []string) (names []string, err error)

func (*OIDC) Global

func (o *OIDC) Global() bool

func (*OIDC) String

func (o *OIDC) String() string

type SecurityGroup

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

func NewSecurityGroup

func NewSecurityGroup(ec2Client *ec2.Client) *SecurityGroup

func (*SecurityGroup) Cleanup

func (sg *SecurityGroup) Cleanup(ctx context.Context, ids []string) ([]string, error)

Cleanup any old security groups that were provisioned as part of testing We execute these in serial since we will most likely get rate limited if we try to delete these too aggressively

func (*SecurityGroup) CountAll

func (sg *SecurityGroup) CountAll(ctx context.Context) (count int, err error)

func (*SecurityGroup) Get

func (sg *SecurityGroup) Get(ctx context.Context, clusterName string) (ids []string, err error)

func (*SecurityGroup) GetExpired

func (sg *SecurityGroup) GetExpired(ctx context.Context, expirationTime time.Time, excludedClusters []string) (ids []string, err error)

func (*SecurityGroup) Global

func (sg *SecurityGroup) Global() bool

func (*SecurityGroup) String

func (sg *SecurityGroup) String() string

type Stack

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

func NewStack

func NewStack(cloudFormationClient *cloudformation.Client) *Stack

func (*Stack) Cleanup

func (s *Stack) Cleanup(ctx context.Context, names []string) ([]string, error)

Cleanup any old stacks that were provisioned as part of testing We execute these in serial since we will most likely get rate limited if we try to delete these too aggressively

func (*Stack) CountAll

func (s *Stack) CountAll(ctx context.Context) (count int, err error)

func (*Stack) Get

func (s *Stack) Get(ctx context.Context, clusterName string) (names []string, err error)

func (*Stack) GetExpired

func (s *Stack) GetExpired(ctx context.Context, expirationTime time.Time, excludedClusters []string) (names []string, err error)

func (*Stack) Global

func (s *Stack) Global() bool

func (*Stack) String

func (s *Stack) String() string

type Type

type Type interface {
	// String is the string representation of the type
	String() string
	// Global determines if a resource is globally located in an account
	Global() bool
	// Get returns all resources of the type associated with the clusterName
	Get(ctx context.Context, clusterName string) (ids []string, err error)
	// GetExpired returns all resources of the type that were provisioned before the expirationTime
	GetExpired(ctx context.Context, expirationTime time.Time, excludedClusters []string) (ids []string, err error)
	// Cleanup deletes all resources of the type by id and returns the resource ids it succeeded to delete
	// In general, if all resources can't be deleted by id with a single API call (like with DeleteInstances)
	// you should call the requests synchronously to avoid rate limiting against the number of requests made
	Cleanup(ctx context.Context, ids []string) (cleaned []string, err error)
	// CountAll returns the number of all resource of the type in the account
	CountAll(ctx context.Context) (count int, err error)
}

Type is a resource type that can be cleaned through a cluster clean-up operation and through an expiration-based cleanup operation

type VPCEndpoint

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

func NewVPCEndpoint

func NewVPCEndpoint(ec2Client *ec2.Client) *VPCEndpoint

func (*VPCEndpoint) Cleanup

func (v *VPCEndpoint) Cleanup(ctx context.Context, ids []string) ([]string, error)

Cleanup any old VPC endpoints that were provisioned as part of testing

func (*VPCEndpoint) CountAll

func (v *VPCEndpoint) CountAll(ctx context.Context) (count int, err error)

func (*VPCEndpoint) Get

func (v *VPCEndpoint) Get(ctx context.Context, clusterName string) (ids []string, err error)

func (*VPCEndpoint) GetExpired

func (v *VPCEndpoint) GetExpired(ctx context.Context, expirationTime time.Time, excludedClusters []string) (ids []string, err error)

func (*VPCEndpoint) Global

func (v *VPCEndpoint) Global() bool

func (*VPCEndpoint) String

func (v *VPCEndpoint) String() string

type VPCPeeringConnection

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

func NewVPCPeeringConnection

func NewVPCPeeringConnection(ec2Client *ec2.Client) *VPCPeeringConnection

func (*VPCPeeringConnection) Cleanup

func (v *VPCPeeringConnection) Cleanup(ctx context.Context, ids []string) ([]string, error)

Cleanup any old VPC peering connections that were provisioned as part of testing

func (*VPCPeeringConnection) CountAll

func (v *VPCPeeringConnection) CountAll(ctx context.Context) (count int, err error)

func (*VPCPeeringConnection) Get

func (v *VPCPeeringConnection) Get(ctx context.Context, clusterName string) (ids []string, err error)

func (*VPCPeeringConnection) GetExpired

func (v *VPCPeeringConnection) GetExpired(ctx context.Context, expirationTime time.Time, excludedClusters []string) (ids []string, err error)

func (*VPCPeeringConnection) Global

func (v *VPCPeeringConnection) Global() bool

func (*VPCPeeringConnection) String

func (v *VPCPeeringConnection) String() string

Jump to

Keyboard shortcuts

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