lotus/lib/jsonrpc/options.go
jsign dbd51ff8e7 fix issue #127
Signed-off-by: jsign <jsign.uy@gmail.com>
2020-01-24 21:15:49 -03:00

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
}
}