config: flatten WorkerConfig to value type in PoolConfig

This commit is contained in:
Jay
2026-05-26 14:13:40 -04:00
parent c82e0184f5
commit fac62c0675
3 changed files with 11 additions and 12 deletions
+2 -1
View File
@@ -101,7 +101,8 @@ func NewPool(ctx context.Context, config *PoolConfig, handler slog.Handler,
if config.WorkerFactory == nil {
config.WorkerFactory = func(
ctx context.Context, id string, handler slog.Handler) (Worker, error) {
return NewWorker(ctx, id, config.WorkerConfig, handler)
wc := config.WorkerConfig
return NewWorker(ctx, id, &wc, handler)
}
}