exporters

package
v0.2.159 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter added in v0.2.110

type Exporter interface {
	SendAdmissionAlert(ruleFailure rules.RuleFailure)
	SendRegistryStatus(guid string, status armotypes.RegistryScanStatus, statusMessage string, time time.Time)
}

type HTTPAlertsList

type HTTPAlertsList struct {
	Kind       string             `json:"kind"`
	ApiVersion string             `json:"apiVersion"`
	Spec       HTTPAlertsListSpec `json:"spec"`
}

type HTTPAlertsListSpec

type HTTPAlertsListSpec struct {
	Alerts        []apitypes.RuntimeAlert `json:"alerts"`
	ProcessTree   apitypes.ProcessTree    `json:"processTree"`
	CloudMetadata apitypes.CloudMetadata  `json:"cloudMetadata"`
}

type HTTPExporter

type HTTPExporter struct {
	Host        string `json:"host"`
	ClusterName string `json:"clusterName"`
	ClusterUID  string `json:"clusterUID"`
	// contains filtered or unexported fields
}

we will have a CRD-like json struct to send in the HTTP request

func InitHTTPExporter

func InitHTTPExporter(config HTTPExporterConfig, clusterName string, cloudMetadata *apitypes.CloudMetadata, clusterUID string) (*HTTPExporter, error)

InitHTTPExporter initializes an HTTPExporter with the given URL, headers, timeout, and method

func (*HTTPExporter) SendAdmissionAlert

func (exporter *HTTPExporter) SendAdmissionAlert(ruleFailure rules.RuleFailure)

func (*HTTPExporter) SendRegistryStatus added in v0.2.46

func (exporter *HTTPExporter) SendRegistryStatus(guid string, status apitypes.RegistryScanStatus, statusMessage string, time time.Time)

type HTTPExporterConfig

type HTTPExporterConfig struct {
	// URL is the URL to send the HTTP request to
	URL string `json:"url"`
	// Headers is a map of headers to send in the HTTP request
	Headers map[string]string `json:"headers"`
	// Timeout is the timeout for the HTTP request
	TimeoutSeconds int `json:"timeoutSeconds"`
	// Method is the HTTP method to use for the HTTP request
	Method             string `json:"method"`
	MaxAlertsPerMinute int    `json:"maxAlertsPerMinute"`
}

func (*HTTPExporterConfig) Validate

func (config *HTTPExporterConfig) Validate() error

type MockExporter added in v0.2.110

type MockExporter struct{}

func (MockExporter) SendAdmissionAlert added in v0.2.110

func (m MockExporter) SendAdmissionAlert(_ rules.RuleFailure)

func (MockExporter) SendRegistryStatus added in v0.2.110

func (m MockExporter) SendRegistryStatus(_ string, _ armotypes.RegistryScanStatus, _ string, _ time.Time)

Jump to

Keyboard shortcuts

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