glogx

package
v0.0.0-...-386b7fa Latest Latest
Warning

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

Go to latest
Published: May 14, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxPodsLogged is the maximum number of pods for which we will
	// log detailed information every loop at verbosity < 5.
	MaxPodsLogged = 20
	// MaxPodsLoggedV5 is the maximum number of pods for which we will
	// log detailed information every loop at verbosity >= 5.
	MaxPodsLoggedV5 = 1000
)

Variables

This section is empty.

Functions

func NewLoggingQuota

func NewLoggingQuota(n int) *quota

NewLoggingQuota returns a quota object with limit & left set to the passed value.

func Over

func Over(quota *quota) klog.Verbose

Over reports whether quota for logging was exceeded. The returned value is a boolean of type glogx.Verbose.

func PodsLoggingQuota

func PodsLoggingQuota() *quota

PodsLoggingQuota returns a new quota with default limit for pods at current verbosity.

func UpTo

func UpTo(quota *quota) klog.Verbose

UpTo decreases quota for logging and reports whether there was any left. The returned value is a boolean of type glogx.Verbose.

Types

type Verbose

type Verbose klog.Verbose

Verbose is a wrapper for klog.Verbose that implements UpTo and Over.

func V

func V(n klog.Level) Verbose

V calls V from glog and wraps the result into glogx.Verbose.

func (Verbose) Over

func (v Verbose) Over(quota *quota) klog.Verbose

Over calls Over from this package if called on true object. The returned value is a boolean of type klog.Verbose.

func (Verbose) UpTo

func (v Verbose) UpTo(quota *quota) klog.Verbose

UpTo calls UpTo from this package if called on true object. The returned value is a boolean of type klog.Verbose.

Jump to

Keyboard shortcuts

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