transport: copy-on-intake in NewConnection/NewPool; add ConnectionConfig.Clone; remove SetDialer; dialer via config
This commit is contained in:
@@ -2,7 +2,6 @@ package honeybee
|
||||
|
||||
import (
|
||||
"git.wisehodl.dev/jay/go-honeybee/transport"
|
||||
"git.wisehodl.dev/jay/go-honeybee/types"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -18,7 +17,6 @@ type PoolConfig struct {
|
||||
ConnectionConfig transport.ConnectionConfig
|
||||
WorkerFactory WorkerFactory
|
||||
WorkerConfig WorkerConfig
|
||||
Dialer types.Dialer
|
||||
}
|
||||
|
||||
type PoolOption func(*PoolConfig) error
|
||||
@@ -124,13 +122,6 @@ func WithWorkerConfig(wc WorkerConfig) PoolOption {
|
||||
}
|
||||
}
|
||||
|
||||
func WithPoolDialer(d types.Dialer) PoolOption {
|
||||
return func(c *PoolConfig) error {
|
||||
c.Dialer = d
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func WithWorkerFactory(wf WorkerFactory) PoolOption {
|
||||
return func(c *PoolConfig) error {
|
||||
c.WorkerFactory = wf
|
||||
|
||||
Reference in New Issue
Block a user