mutators

package
v3.9.9 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func NewMutationCache

func NewMutationCache() *Cache

func (*Cache) Remove

func (c *Cache) Remove(mID types.ID)

func (*Cache) TallyConflict

func (c *Cache) TallyConflict() int

TallyConflict calculates and returns the number of mutators that are currently in a conflict state as maintained in the Cache.

func (*Cache) TallyStatus

func (c *Cache) TallyStatus() map[MutatorIngestionStatus]int

TallyStatus calculates the number of mutators in each of the available MutatorIngestionStatus states and returns a map of those states and the count for each.

func (*Cache) Upsert

func (c *Cache) Upsert(mID types.ID, ingestionStatus MutatorIngestionStatus, conflict bool)

type MutatorIngestionStatus

type MutatorIngestionStatus string

MutatorIngestionStatus defines the outcomes of an attempt to add a Mutator to the mutation System.

const (
	// MutatorStatusActive denotes a successfully ingested mutator, ready to mutate objects.
	MutatorStatusActive MutatorIngestionStatus = "active"
	// MutatorStatusError denotes a mutator that failed to ingest.
	MutatorStatusError MutatorIngestionStatus = "error"
)

type StatsReporter

type StatsReporter interface {
	ReportMutatorIngestionRequest(ms MutatorIngestionStatus, d time.Duration) error
	ReportMutatorsStatus(ms MutatorIngestionStatus, n int) error
	ReportMutatorsInConflict(n int) error
}

StatsReporter reports mutator-related controller metrics.

func NewStatsReporter

func NewStatsReporter() StatsReporter

NewStatsReporter creates a reporter for webhook metrics.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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