Documentation
¶
Overview ¶
Package integrationcap selects Integrations by the capability they provide. It exists because more than one controller now reads Integration configuration — the integration-controller's receiver routes deliveries by capability, and the context-controller reads the asset-inventory enhancer's settings — and the selection rule (exactly one enabled Integration per capability per namespace, the v1alpha1 singleton rule) must not fork.
Index ¶
- Variables
- func AWSResourceTagsEnabled(i *v1alpha1.Integration) bool
- func AzureResourceTagsEnabled(i *v1alpha1.Integration) bool
- func CloudAssetInventoryEnabled(i *v1alpha1.Integration) bool
- func Select(ctx context.Context, r client.Reader, namespace string, has Capability) (*v1alpha1.Integration, error)
- type Capability
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNoIntegration: no enabled Integration provides the capability. ErrNoIntegration = errors.New("no integration provides the capability") // ErrAmbiguousIntegration: several Integrations provide the capability — // v1alpha1 requires exactly one per namespace. ErrAmbiguousIntegration = errors.New("multiple integrations provide the capability") )
Sentinel errors for integration selection.
Functions ¶
func AWSResourceTagsEnabled ¶
func AWSResourceTagsEnabled(i *v1alpha1.Integration) bool
AWSResourceTagsEnabled reports whether the Integration enables the AWS resource-tags enhancer. It lives here for the same reason as CloudAssetInventoryEnabled: its consumer is the context-controller.
func AzureResourceTagsEnabled ¶
func AzureResourceTagsEnabled(i *v1alpha1.Integration) bool
AzureResourceTagsEnabled reports whether the Integration enables the Azure resource-tags enhancer. It lives here for the same reason as CloudAssetInventoryEnabled: its consumer is the context-controller.
func CloudAssetInventoryEnabled ¶
func CloudAssetInventoryEnabled(i *v1alpha1.Integration) bool
CloudAssetInventoryEnabled reports whether the Integration enables the Cloud Asset Inventory enhancer. It lives here rather than beside the receiver's ingestion predicates because its consumer is the context-controller, which must not import the integration-controller.
Types ¶
type Capability ¶
type Capability func(*v1alpha1.Integration) bool
Capability selects Integrations by what they provide.