Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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"`
}
type HTTPExporter ¶
type HTTPExporter struct {
Host string `json:"host"`
ClusterName string `json:"clusterName"`
// 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) (*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 ¶
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
Click to show internal directories.
Click to hide internal directories.