Documentation ¶
Overview ¶
Package metrics contains metrics interfaces and implementations for PodSecurity admission
Index ¶
- Constants
- type Decision
- type Mode
- type PrometheusRecorder
- func (r *PrometheusRecorder) MustRegister(registerFunc func(...metrics.Registerable))
- func (r *PrometheusRecorder) RecordError(fatal bool, attrs api.Attributes)
- func (r *PrometheusRecorder) RecordEvaluation(decision Decision, policy api.LevelVersion, evalMode Mode, ...)
- func (r *PrometheusRecorder) RecordExemption(attrs api.Attributes)
- func (r *PrometheusRecorder) Reset()
- type Recorder
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 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) }
Click to show internal directories.
Click to hide internal directories.