apiserverk8s.io/apiserver/plugin/pkg/audit/dynamic/enforced Index | Files

package enforced

import "k8s.io/apiserver/plugin/pkg/audit/dynamic/enforced"

Index

Constants

const PluginName = "enforced"

PluginName is the name reported in error metrics.

Functions

func NewBackend

func NewBackend(delegate audit.Backend, p policy.Checker) audit.Backend

NewBackend returns an enforced audit backend that wraps delegate backend. Enforced backend automatically runs and shuts down the delegate backend.

Types

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

Backend filters audit events according to the policy trimming them as necessary to match the level

func (Backend) ProcessEvents

func (b Backend) ProcessEvents(events ...*auditinternal.Event) bool

ProcessEvents enforces policy on a shallow copy of the given event dropping any sections that don't conform

func (Backend) Run

func (b Backend) Run(stopCh <-chan struct{}) error

Run the delegate backend

func (Backend) Shutdown

func (b Backend) Shutdown()

Shutdown the delegate backend

func (Backend) String

func (b Backend) String() string

String returns a string representation of the backend

Source Files

enforced.go

Version
v0.18.0
Published
Mar 26, 2020
Platform
js/wasm
Imports
5 packages
Last checked
1 second ago

Tools for package owners.