processors

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

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

Option is the option to set up a AssetInventoryProcessor.

Jump to

Keyboard shortcuts

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