Skip to content

Commit

Permalink
chore: refine oteld.ReconcileCtx
Browse files Browse the repository at this point in the history
  • Loading branch information
sophon-zt committed Oct 23, 2023
1 parent 1bfc975 commit 587f1e7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions controllers/monitor/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ type OteldCfgRef struct {
type ReconcileCtx struct {
intctrlutil.RequestCtx

//Ctx context.Context
//Req ctrl.Request
//Log logr.Logger
// Ctx context.Context
// Req ctrl.Request
// Log logr.Logger
Config *Config
Namespace string

Expand Down Expand Up @@ -178,9 +178,11 @@ func NewReconcileTask(name string, task ReconcileFunc) ReconcileTask {
}
newTask := func(reqCtx ReconcileCtx) error {
reqCtx = ReconcileCtx{
Ctx: reqCtx.Ctx,
Req: reqCtx.Req,
Log: reqCtx.Log.WithValues("subTask", name),
RequestCtx: intctrlutil.RequestCtx{
Ctx: reqCtx.Ctx,
Req: reqCtx.Req,
Log: reqCtx.Log.WithValues("subTask", name),
},
Config: reqCtx.Config,
Namespace: reqCtx.Namespace,
OteldCfgRef: reqCtx.OteldCfgRef,
Expand Down

0 comments on commit 587f1e7

Please sign in to comment.