Documentation ¶
Index ¶
- func GetByName(name ListerName) (lister.Lister, error)
- func GetByType(kind resource.ResourceType) (lister.Lister, error)
- func List(options ...Option) (*resource.Group, error)
- func Regions(cfg aws.Config, prefixes ...string) ([]string, error)
- func Types(include []string, exclude []string) []resource.ResourceType
- type Cacher
- type ListerName
- type NoOpCache
- type Option
- func WithAWSConfig(awsCfg aws.Config) Option
- func WithCache(cache Cacher) Option
- func WithContext(ctx ctx2.Context) Option
- func WithListers(listers []ListerName) Option
- func WithRegions(regions []string) Option
- func WithStatus(ch chan<- context.StatusUpdate) Option
- func WithWorkerCount(numWorkers int) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetByName ¶
func GetByName(name ListerName) (lister.Lister, error)
GetByName finds the Lister that matches the name of the input argument. It returns an error if no match is found.
func GetByType ¶
func GetByType(kind resource.ResourceType) (lister.Lister, error)
GetByType finds the Lister that processes the ResourceType given as an argument. It returns an error if no match is found.
func List ¶
List handles the execution of listers across multiple regions. It creates a worker pool to process every Lister/Region combination and aggregates the results together before returning them. If a cache is provided, each Lister/Region combination will first check for an existing result before querying AWS. Any new results will be updated in the cache.
func Regions ¶
Regions applies a filter to all available AWS regions and returns a list of the ones that match. The filtering is done by finding the regions that start with any of the prefixes pass in as arguments. If no prefixes are given, all available regions are returned.
func Types ¶
func Types(include []string, exclude []string) []resource.ResourceType
Types applies a filter to all supported AWS resources types and returns a slice of the ones that match. It first builds a list of all resources types that match any of the prefixes defined in `include`, and then removes any resource types that match any of the prefixes defined in `exclude`
Types ¶
type Cacher ¶
type Cacher interface { Initialize(accountId string) error IsCached(region string, kind ListerName) bool SaveGroup(kind ListerName, group *resource.Group) error LoadGroup(region string, kind ListerName) (*resource.Group, error) }
Cacher is an interface that defines the necessary functions for an AWSets cache.
type ListerName ¶
type ListerName string
func Listers ¶
func Listers(include []string, exclude []string) []ListerName
Listers applies an include/exclude filter to all implemented listers and returns a slice of the Lister names that match. The filter is processed against the resource types handled by each Lister.
type NoOpCache ¶ added in v0.5.0
type NoOpCache struct { }
NoOpCache is the default cache provided by AWSets. It does nothing, and will never load nor save any data.
func (NoOpCache) Initialize ¶ added in v0.5.0
func (NoOpCache) IsCached ¶ added in v0.5.0
func (c NoOpCache) IsCached(region string, kind ListerName) bool
type Option ¶ added in v0.7.0
type Option func(o *config)
func WithAWSConfig ¶ added in v0.7.0
func WithContext ¶ added in v0.7.0
func WithListers ¶ added in v0.7.0
func WithListers(listers []ListerName) Option
func WithRegions ¶ added in v0.7.0
func WithStatus ¶ added in v0.7.0
func WithStatus(ch chan<- context.StatusUpdate) Option