Documentation
¶
Overview ¶
Package internal provides some internal functionalities for the library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRandomName ¶
func GetRandomName() string
GetRandomName generates a random name from the list of adjectives and surnames in this package formatted as "adjective_surname".
Types ¶
type Sink ¶ added in v2.1.0
type Sink struct {
// contains filtered or unexported fields
}
Sink represents a logging implementation to be used with the logr.Logger implementation.
func NewSink ¶ added in v2.1.0
func NewSink(l logger) *Sink
NewSink returns a Sink for using as the logr.Logger's sink.
func (*Sink) Enabled ¶ added in v2.1.0
Enabled tests whether this LogSink is enabled at the specified V-level. For example, commandline flags might be used to set the logging verbosity and disable some info logs.
func (*Sink) Error ¶ added in v2.1.0
Error logs an error, with the given message and key/value pairs as context. See Logger.Error for more details.
func (*Sink) Info ¶ added in v2.1.0
Info logs a non-error message with the given key/value pairs as context. The level argument is provided for optional logging. This method will only be called when Enabled(level) is true. See Logger.Info for more details.
func (*Sink) Init ¶ added in v2.1.0
func (s *Sink) Init(logr.RuntimeInfo)
Init receives optional information about the logr library for LogSink implementations that need it.