-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1155 from jsign/issue127_2
fix issue #127
- Loading branch information
Showing
3 changed files
with
147 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters