20 lines
338 B
Go
20 lines
338 B
Go
package client
|
|
|
|
import "time"
|
|
|
|
// Config holds Monetix gateway client settings.
|
|
type Config struct {
|
|
Address string
|
|
DialTimeout time.Duration
|
|
CallTimeout time.Duration
|
|
}
|
|
|
|
func (c *Config) setDefaults() {
|
|
if c.DialTimeout <= 0 {
|
|
c.DialTimeout = 5 * time.Second
|
|
}
|
|
if c.CallTimeout <= 0 {
|
|
c.CallTimeout = 10 * time.Second
|
|
}
|
|
}
|