dbd51ff8e7
Signed-off-by: jsign <jsign.uy@gmail.com>
20 lines
305 B
Go
20 lines
305 B
Go
package jsonrpc
|
|
|
|
import "time"
|
|
|
|
type Config struct {
|
|
ReconnectInterval time.Duration
|
|
}
|
|
|
|
var defaultConfig = Config{
|
|
ReconnectInterval: time.Second * 5,
|
|
}
|
|
|
|
type Option func(c *Config)
|
|
|
|
func WithReconnectInterval(d time.Duration) func(c *Config) {
|
|
return func(c *Config) {
|
|
c.ReconnectInterval = d
|
|
}
|
|
}
|