enforced

package
Version: v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2019 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const PluginName = "enforced"

PluginName is the name reported in error metrics.

Variables

This section is empty.

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

Jump to

Keyboard shortcuts

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