Documentation ¶
Overview ¶
Package scanner provides a mechanism for scanning resources and adding them to the item queue for processing. The scope of the scanner is determined by the resource types that are passed to it. The scanner will then run the lister for each resource type and add the resources to the item queue for processing.
Index ¶
Constants ¶
const DefaultParallelQueries = 16
DefaultParallelQueries is the number of parallel queries to run at any given time for a scanner.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IScanner ¶
type IScanner interface { Run(resourceTypes []string) // contains filtered or unexported methods }
type MutateOptsFunc ¶
type MutateOptsFunc func(opts interface{}, resourceType string) interface{}
MutateOptsFunc is a function that can mutate the Options for a given resource type. This is useful for when you need to pass in a different set of Options for a given resource type. For example, AWS nuke needs to be able to populate the region and session for a given resource type give that it might only exist in us-east-1.
type Scanner ¶
type Scanner struct { Items chan *queue.Item `hash:"ignore"` ResourceTypes []string Options interface{} Owner string // contains filtered or unexported fields }
Scanner is collection of resource types that will be scanned for existing resources and added to the item queue for processing. These items will be filtered and then processed.
func (*Scanner) RegisterMutateOptsFunc ¶
func (s *Scanner) RegisterMutateOptsFunc(morph MutateOptsFunc) error
RegisterMutateOptsFunc registers a mutate Options function for the scanner. The mutate Options function is called for each resource type that is being scanned. This allows you to mutate the Options for a given resource type.
func (*Scanner) SetParallelQueries ¶
SetParallelQueries changes the number of parallel queries to run at any given time from the default for the scanner.