summaryrefslogtreecommitdiff
path: root/pkg/pool/static_pool.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-06-23 15:02:16 +0300
committerValery Piashchynski <[email protected]>2021-06-23 15:02:16 +0300
commit7fc09959619e9e400ecafcffcd63e38812f397a6 (patch)
treee6629f40cda53988facfb455ed460dbd05bbdc29 /pkg/pool/static_pool.go
parentb0e7ac1aa40e9dbb688f88ac21b10a321a02c252 (diff)
- Swithc from value to pointer to the pool configuration. Interface
value changed. Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'pkg/pool/static_pool.go')
-rwxr-xr-xpkg/pool/static_pool.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/pool/static_pool.go b/pkg/pool/static_pool.go
index ab025fa1..74e06b81 100755
--- a/pkg/pool/static_pool.go
+++ b/pkg/pool/static_pool.go
@@ -26,7 +26,7 @@ type Command func() *exec.Cmd
// StaticPool controls worker creation, destruction and task routing. Pool uses fixed amount of stack.
type StaticPool struct {
- cfg Config
+ cfg *Config
// worker command creator
cmd Command
@@ -51,7 +51,7 @@ type StaticPool struct {
}
// Initialize creates new worker pool and task multiplexer. StaticPool will initiate with one worker.
-func Initialize(ctx context.Context, cmd Command, factory transport.Factory, cfg Config, options ...Options) (Pool, error) {
+func Initialize(ctx context.Context, cmd Command, factory transport.Factory, cfg *Config, options ...Options) (Pool, error) {
const op = errors.Op("static_pool_initialize")
if factory == nil {
return nil, errors.E(op, errors.Str("no factory initialized"))