compliance

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sEmitter

type K8sEmitter struct {
	// Client is a Kubernetes client for the cluster where the compliance events
	// will be created.
	Client client.Client

	// Source contains optional information for where the event comes from.
	Source corev1.EventSource

	// Mutators modify the Event after the fields are initially set, but before
	// it is created on the cluster. They are run in the order they are defined.
	Mutators []func(corev1.Event) (corev1.Event, error)
}

K8sEmitter is an emitter of Kubernetes events which the policy framework watches for in order to aggregate and report policy status.

func (K8sEmitter) Emit

Emit creates the Kubernetes Event on the cluster. It returns an error if the API call fails.

func (K8sEmitter) EmitEvent

EmitEvent creates the Kubernetes Event on the cluster. It returns the Event that was (at least) attempted to be created, and an error if the API call fails.

Jump to

Keyboard shortcuts

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