Skip to content

Find, verify, and analyze leaked credentials

[OC-71] - Add helper methods to context to set metatada token values for the API (#760)

ahravad1c96c15100
diff --git a/pkg/context/context.go b/pkg/context/context.go
index 34725de7b..f2917792e 100644
--- a/pkg/context/context.go
+++ b/pkg/context/context.go
@@ -16,6 +16,19 @@ var (
type Context interface {
context.Context
Logger() logr.Logger
+ Parent() context.Context
+ SetParent(ctx context.Context) Context
+}
+
+// Parent returns the parent context.
+func (l logCtx) Parent() context.Context {
+ return l.Context
+}
+
+// SetParent sets the parent context on the context.
+func (l logCtx) SetParent(ctx context.Context) Context {
+ l.Context = ctx
+ return l
}
type CancelFunc context.CancelFunc