v2k8s.io/klog/v2/internal/verbosity Index | Files

package verbosity

import "k8s.io/klog/v2/internal/verbosity"

Index

Types

type Level

type Level int32

Level must be an int32 to support atomic read/writes.

type VState

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

VState contains settings and state. Some of its fields can be accessed through atomic read/writes, in other cases a mutex must be held.

func New

func New() *VState

New returns a struct that implements -v and -vmodule support. Changing and checking these settings is thread-safe, with all concurrency issues handled internally.

func (*VState) Enabled

func (vs *VState) Enabled(level Level, depth int) bool

Enabled checks whether logging is enabled at the given level. This must be called with depth=0 when the caller of enabled will do the logging and higher values when more stack levels need to be skipped.

The mutex will be locked only if needed.

func (*VState) V

func (vs *VState) V() Value

func (*VState) VModule

func (vs *VState) VModule() Value

type Value

type Value interface {
	flag.Value
	Type() string
}

Value is an extension that makes it possible to use the values in pflag.

Source Files

verbosity.go

Version
v2.130.0
Published
Jun 15, 2024
Platform
windows/amd64
Imports
10 packages
Last checked
4 hours ago

Tools for package owners.