rate

package
v0.0.0-...-2b22020 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2018 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 WarningData

type WarningData struct {
	LastEvent   *v1.Event
	RateCounter *ratecounter.RateCounter
}

WarningData stores info about last seen warning

type WarningRates

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

WarningRates stores info per namespace

func NewRateWarningCounter

func NewRateWarningCounter() *WarningRates

NewRateWarningCounter creates a new rate service

func (*WarningRates) Dump

func (w *WarningRates) Dump(io io.Writer)

Dump the content of the current rates

func (*WarningRates) GetAllWarningRate

func (w *WarningRates) GetAllWarningRate() map[string]WarningData

GetWarningRate get the current rate for a project

func (*WarningRates) GetWarningRate

func (w *WarningRates) GetWarningRate(namespace string) (*WarningData, bool)

GetWarningRate get the current rate for a project

func (*WarningRates) Register

func (w *WarningRates) Register(evt *v1.Event)

Register registers an event

Jump to

Keyboard shortcuts

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