Improve source query diagnostics
This commit is contained in:
11
client.go
11
client.go
@@ -21,3 +21,14 @@ func NewAll(timeout time.Duration) *Client {
|
||||
Source: source.New(source.Options{Timeout: timeout}),
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Client) SetSourceDebug(debug bool) {
|
||||
if c == nil {
|
||||
return
|
||||
}
|
||||
timeout := 2 * time.Second
|
||||
if c.Source != nil {
|
||||
timeout = c.Source.Timeout()
|
||||
}
|
||||
c.Source = source.New(source.Options{Timeout: timeout, Debug: debug})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user