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 ¶
func (e K8sEmitter) Emit(ctx context.Context, pl nucleusv1beta1.PolicyLike) error
Emit creates the Kubernetes Event on the cluster. It returns an error if the API call fails.
func (K8sEmitter) EmitEvent ¶
func (e K8sEmitter) EmitEvent(ctx context.Context, pol nucleusv1beta1.PolicyLike) (*corev1.Event, error)
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.
Click to show internal directories.
Click to hide internal directories.