rebase: vendor files required for kmip

Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
Rakshith R
2022-08-16 15:18:06 +05:30
committed by mergify[bot]
parent 0c33a33d5c
commit e72ed593be
186 changed files with 39195 additions and 203 deletions

27
vendor/github.com/gemalto/flume/context.go generated vendored Normal file
View File

@ -0,0 +1,27 @@
package flume
import (
"context"
)
// DefaultLogger is returned by FromContext if no other logger has been
// injected into the context.
var DefaultLogger = New("")
type ctxKey struct{}
var loggerKey = &ctxKey{}
// WithLogger returns a new context with the specified logger injected into it.
func WithLogger(ctx context.Context, l Logger) context.Context {
return context.WithValue(ctx, loggerKey, l)
}
// FromContext returns a logger from the context. If the context
// doesn't contain a logger, the DefaultLogger will be returned.
func FromContext(ctx context.Context) Logger {
if l, ok := ctx.Value(loggerKey).(Logger); ok {
return l
}
return DefaultLogger
}