Skip to content

Commit a30b415

Browse files
committed
feat: Add function to set worker pool in context
1 parent 842d024 commit a30b415

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

contextHandler/contextHandler_getset.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,8 @@ func SetSession_UserRole(ctx context.Context, role string) context.Context {
164164
logHandler.Trace.Printf("Setting User Role in Context: %v=%v", userRoleKey.name, role)
165165
return context.WithValue(ctx, userRoleKey, role)
166166
}
167+
168+
func AddWorkerPoolToContext(ctx context.Context, pool pond.Pool) context.Context {
169+
logHandler.Trace.Printf("Setting Worker Pool in Context: %v=%v", WorkerPoolKey.name, pool)
170+
return context.WithValue(ctx, WorkerPoolKey, pool)
171+
}

0 commit comments

Comments
 (0)