metrics

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Overview

Package metrics contains metrics interfaces and implementations for PodSecurity admission

Index

Constants

View Source
const (
	ModeAudit     = "audit"
	ModeEnforce   = "enforce"
	ModeWarn      = "warn"
	DecisionAllow = "allow" // Policy evaluated, request allowed
	DecisionDeny  = "deny"  // Policy evaluated, request denied
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Decision added in v0.23.0

type Decision string

type Mode added in v0.23.0

type Mode string

type PrometheusRecorder added in v0.23.0

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

func NewPrometheusRecorder added in v0.23.0

func NewPrometheusRecorder(version api.Version) *PrometheusRecorder

func (*PrometheusRecorder) MustRegister added in v0.23.0

func (r *PrometheusRecorder) MustRegister(registerFunc func(...metrics.Registerable))

func (*PrometheusRecorder) RecordError added in v0.23.0

func (r *PrometheusRecorder) RecordError(fatal bool, attrs api.Attributes)

func (*PrometheusRecorder) RecordEvaluation added in v0.23.0

func (r *PrometheusRecorder) RecordEvaluation(decision Decision, policy api.LevelVersion, evalMode Mode, attrs api.Attributes)

func (*PrometheusRecorder) RecordExemption added in v0.23.0

func (r *PrometheusRecorder) RecordExemption(attrs api.Attributes)

func (*PrometheusRecorder) Reset added in v0.23.0

func (r *PrometheusRecorder) Reset()

type Recorder added in v0.23.0

type Recorder interface {
	RecordEvaluation(Decision, api.LevelVersion, Mode, api.Attributes)
	RecordExemption(api.Attributes)
	RecordError(fatal bool, attrs api.Attributes)
}

Jump to

Keyboard shortcuts

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