kubernetes/staging/src/k8s.io/client-go/rest/warnings.go

type WarningHandler

var defaultWarningHandler

var defaultWarningHandlerLock

// SetDefaultWarningHandler sets the default handler clients use when warning headers are encountered.
// By default, warnings are logged. Several built-in implementations are provided:
//   - NoWarnings suppresses warnings.
//   - WarningLogger logs warnings.
//   - NewWarningWriter() outputs warnings to the provided writer.
func SetDefaultWarningHandler(l WarningHandler) {}

func getDefaultWarningHandler() WarningHandler {}

type NoWarnings

func (NoWarnings) HandleWarningHeader(code int, agent string, message string) {}

type WarningLogger

func (WarningLogger) HandleWarningHeader(code int, agent string, message string) {}

type warningWriter

type WarningWriterOptions

// NewWarningWriter returns an implementation of WarningHandler that outputs code 299 warnings to the specified writer.
func NewWarningWriter(out io.Writer, opts WarningWriterOptions) *warningWriter {}

const yellowColor

const resetColor

// HandleWarningHeader prints warnings with code=299 to the configured writer.
func (w *warningWriter) HandleWarningHeader(code int, agent string, message string) {}

func (w *warningWriter) WarningCount() int {}

func handleWarnings(headers http.Header, handler WarningHandler) []net.WarningHeader {}