Documentation ¶
Index ¶
- func ConfigureGrpcKlog()
- func DelayedDumper(obj interface{}) fmt.Stringer
- func Dump(obj interface{}) string
- func GetKubernetesNamespace() string
- func NodeName() string
- type DurationVal
- type FsWatcher
- type KlogFlagVal
- type MemoryResourceInfo
- type MetricsServer
- type NumaMemoryResources
- type RegexpVal
- type StringSetVal
- type StringSliceVal
- type TlsConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DelayedDumper ¶ added in v0.14.0
DelayedDumper delays the dumping of an object. Useful in logging to delay the processing (JSON marshalling) until (or if) the object is actually evaluated.
func GetKubernetesNamespace ¶ added in v0.12.0
func GetKubernetesNamespace() string
GetKubernetesNamespace returns the kubernetes namespace we're running under, or an empty string if the namespace cannot be determined.
Types ¶
type DurationVal ¶ added in v0.14.0
DurationVal is a wrapper for handling time.Duration as a command line flag
func (*DurationVal) Set ¶ added in v0.14.0
func (d *DurationVal) Set(val string) error
Set implements the flag.Value interface
func (*DurationVal) UnmarshalJSON ¶ added in v0.14.0
func (d *DurationVal) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the Unmarshaler interface from "encoding/json"
type FsWatcher ¶
type FsWatcher struct { *fsnotify.Watcher Events chan struct{} // contains filtered or unexported fields }
FsWatcher is a wrapper helper for watching files
type KlogFlagVal ¶
type KlogFlagVal struct {
// contains filtered or unexported fields
}
KlogFlagVal is a wrapper to allow dynamic control of klog from the config file
func NewKlogFlagVal ¶
func NewKlogFlagVal(f *flag.Flag) *KlogFlagVal
NewKlogFlagVal wraps a klog flag into KlogFlagVal type
func (*KlogFlagVal) DefValue ¶
func (k *KlogFlagVal) DefValue() string
DefValue returns the default value of KlogFlagVal as string
func (*KlogFlagVal) IsBoolFlag ¶
func (k *KlogFlagVal) IsBoolFlag() bool
IsBoolFlag implements flag.boolFlag.IsBoolFlag() for wrapped klog flags.
func (*KlogFlagVal) IsSetFromCmdline ¶
func (k *KlogFlagVal) IsSetFromCmdline() bool
IsSetFromCmdline returns true if the value has been set via Set()
func (*KlogFlagVal) Set ¶
func (k *KlogFlagVal) Set(value string) error
Set implements flag.Value interface
func (*KlogFlagVal) SetFromConfig ¶
func (k *KlogFlagVal) SetFromConfig(value string) error
SetFromConfig sets the value without marking it as set from the cmdline
func (*KlogFlagVal) String ¶
func (k *KlogFlagVal) String() string
String implements flag.Value interface
type MemoryResourceInfo ¶ added in v0.10.0
type MemoryResourceInfo map[corev1.ResourceName]int64
MemoryResourceInfo holds information of memory resources per resource type.
type MetricsServer ¶ added in v0.15.0
type MetricsServer struct {
// contains filtered or unexported fields
}
func CreateMetricsServer ¶ added in v0.15.0
func CreateMetricsServer(port int, cs ...prometheus.Collector) *MetricsServer
RunMetricsServer starts a new http server to expose metrics.
func (*MetricsServer) Run ¶ added in v0.15.0
func (s *MetricsServer) Run()
Run runs the metrics server.
func (*MetricsServer) Stop ¶ added in v0.15.0
func (s *MetricsServer) Stop()
Stop stops the metrics server.
type NumaMemoryResources ¶ added in v0.10.0
type NumaMemoryResources map[int]MemoryResourceInfo
NumaMemoryResources contains information of the memory resources per NUMA nodes of the system.
func GetNumaMemoryResources ¶ added in v0.10.0
func GetNumaMemoryResources() (NumaMemoryResources, error)
GetNumaMemoryResources returns total amount of memory and hugepages under NUMA nodes
type RegexpVal ¶
RegexpVal is a wrapper for regexp command line flags
func (*RegexpVal) UnmarshalJSON ¶
UnmarshalJSON implements the Unmarshaler interface from "encoding/json"
type StringSetVal ¶
type StringSetVal map[string]struct{}
StringSetVal is a Value encapsulating a set of comma-separated strings
func (*StringSetVal) Set ¶
func (a *StringSetVal) Set(val string) error
Set implements the flag.Value interface
func (*StringSetVal) String ¶
func (a *StringSetVal) String() string
String implements the flag.Value interface
func (*StringSetVal) UnmarshalJSON ¶ added in v0.13.0
func (a *StringSetVal) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the Unmarshaler interface from "encoding/json"
type StringSliceVal ¶
type StringSliceVal []string
StringSliceVal is a Value encapsulating a slice of comma-separated strings
func (*StringSliceVal) Set ¶
func (a *StringSliceVal) Set(val string) error
Set implements the regexp.Value interface
func (*StringSliceVal) String ¶
func (a *StringSliceVal) String() string
String implements the regexp.Value interface
type TlsConfig ¶
TlsConfig is a TLS config wrapper/helper for cert rotation
func (*TlsConfig) GetConfig ¶
GetConfig returns the current TLS configuration. Intended to be used as the GetConfigForClient callback in tls.Config.
func (*TlsConfig) UpdateConfig ¶
UpdateConfig updates the wrapped TLS config