Bump sigs.k8s.io/controller-runtime to v0.14.4 (#5507)
* Bump sigs.k8s.io/controller-runtime to v0.14.4 * Update gofmt
This commit is contained in:
3
vendor/k8s.io/apiserver/pkg/warning/context.go
generated
vendored
3
vendor/k8s.io/apiserver/pkg/warning/context.go
generated
vendored
@@ -24,7 +24,7 @@ import (
|
||||
type key int
|
||||
|
||||
const (
|
||||
// auditAnnotationsKey is the context key for the audit annotations.
|
||||
// warningRecorderKey is the context key for the warning recorder.
|
||||
warningRecorderKey key = iota
|
||||
)
|
||||
|
||||
@@ -41,6 +41,7 @@ type Recorder interface {
|
||||
func WithWarningRecorder(ctx context.Context, recorder Recorder) context.Context {
|
||||
return context.WithValue(ctx, warningRecorderKey, recorder)
|
||||
}
|
||||
|
||||
func warningRecorderFrom(ctx context.Context) (Recorder, bool) {
|
||||
recorder, ok := ctx.Value(warningRecorderKey).(Recorder)
|
||||
return recorder, ok
|
||||
|
||||
Reference in New Issue
Block a user