summaryrefslogtreecommitdiff
path: root/static_pool.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-11-16 15:11:27 +0300
committerValery Piashchynski <[email protected]>2020-11-16 15:11:27 +0300
commitd40ff179e43a02726bfa4298e523a16c79a88cea (patch)
tree2677952acd0a396f1950b2e85cae62e8b9818d7a /static_pool.go
parenta7ba4df83b4f2c67a3a0fb9d1dd35663935c90be (diff)
Rename app->server
Rename Config -> PoolConfig
Diffstat (limited to 'static_pool.go')
-rwxr-xr-xstatic_pool.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/static_pool.go b/static_pool.go
index 0e5ee050..c1dacd8d 100755
--- a/static_pool.go
+++ b/static_pool.go
@@ -29,7 +29,7 @@ type PoolOptions func(p *StaticPool)
// StaticPool controls worker creation, destruction and task routing. Pool uses fixed amount of stack.
type StaticPool struct {
- cfg Config
+ cfg PoolConfig
// worker command creator
cmd func() *exec.Cmd
@@ -52,7 +52,7 @@ type StaticPool struct {
}
// NewPool creates new worker pool and task multiplexer. StaticPool will initiate with one worker.
-func NewPool(ctx context.Context, cmd func() *exec.Cmd, factory Factory, cfg Config, options ...PoolOptions) (Pool, error) {
+func NewPool(ctx context.Context, cmd func() *exec.Cmd, factory Factory, cfg PoolConfig, options ...PoolOptions) (Pool, error) {
const op = errors.Op("NewPool")
cfg.InitDefaults()
@@ -119,8 +119,8 @@ func (sp *StaticPool) AddListener(listener util.EventListener) {
sp.events.AddListener(listener)
}
-// Config returns associated pool configuration. Immutable.
-func (sp *StaticPool) GetConfig() Config {
+// PoolConfig returns associated pool configuration. Immutable.
+func (sp *StaticPool) GetConfig() PoolConfig {
return sp.cfg
}