azs

package
v0.0.0-...-4093306 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 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 AvailabilityZone

type AvailabilityZone struct {
	ec2types.AvailabilityZone
}

AvailabilityZone represent an AWS Security Group This is not the AWS SDK AvailabilityZone type, but a wrapper around it so that we can add additional data

type CreateAvailabilityZoneOpts

type CreateAvailabilityZoneOpts struct {
	Name  string
	VPCID string
}

type SDKAvailabilityZoneOps

type SDKAvailabilityZoneOps interface {
	DescribeAvailabilityZones(context.Context, *ec2.DescribeAvailabilityZonesInput, ...func(*ec2.Options)) (*ec2.DescribeAvailabilityZonesOutput, error)
}

SDKAvailabilityZoneOps is an interface that combines the necessary EC2 SDK client interfaces AWS SDK for Go v2 does not provide a single interface that combines all the necessary methods

type Selector

type Selector struct {
	Tags   map[string]string
	Name   string
	ID     string
	Region string
}

Selector is a struct that represents a security group selector

func ParseSelectors

func ParseSelectors(selectorStr string) ([]Selector, error)

ParseSelectors parses a string of selectors into a slice of Selector structs

type Watcher

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

Watcher discovers availability zones based on selectors

func NewWatcher

func NewWatcher(ec2API SDKAvailabilityZoneOps) Watcher

NewWatcher creates a new Security Group Watcher

func (Watcher) Resolve

func (w Watcher) Resolve(ctx context.Context, selectors []Selector) ([]AvailabilityZone, error)

Resolve returns a list of availability zones that match the provided selectors Multiple calls to EC2 may be sent to resolve the selectors

Jump to

Keyboard shortcuts

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