Documentation ¶
Overview ¶
Package processors provides essential processors for pmap.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetInventoryProcessor ¶
type AssetInventoryProcessor struct {
// contains filtered or unexported fields
}
AssetInventoryProcessor is the Cloud Asset Inventory validation and enrichment processor.
func NewAssetInventoryProcessor ¶
func NewAssetInventoryProcessor(ctx context.Context, client *asset.Client, defaultResourceScope string, opts ...Option) (*AssetInventoryProcessor, error)
NewAssetInventoryProcessor creates a new AssetInventoryProcessor with the given options. Need defaultResourceScope because resources such as GCS bucket won't include Project info in its resource name. See details: https://cloud.google.com/asset-inventory/docs/resource-name-format.
func (*AssetInventoryProcessor) Process ¶
func (p *AssetInventoryProcessor) Process(ctx context.Context, resourceMapping *v1alpha1.ResourceMapping) error
Process validates the existence of resource associated with ResourceMapping, and enriches ResourceMapping with additional annotations such location, ancestors, etc. based on info fetched from Asset Inventory.
type Option ¶
type Option func(p *AssetInventoryProcessor) (*AssetInventoryProcessor, error)
Option is the option to set up a AssetInventoryProcessor.