mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
feat(feed): Configurable request timeout (#456)
* feat(feed): Add field for setting request timeout * fix: missing type in interface * feat: add postgres migration and column to base schema
This commit is contained in:
parent
47eaeaa635
commit
72be86a34f
10 changed files with 42 additions and 14 deletions
|
@ -37,8 +37,9 @@ type BasicAuth struct {
|
|||
}
|
||||
|
||||
type Config struct {
|
||||
Host string
|
||||
ApiKey string
|
||||
Host string
|
||||
ApiKey string
|
||||
Timeout time.Duration
|
||||
|
||||
UseBasicAuth bool
|
||||
BasicAuth BasicAuth
|
||||
|
@ -48,7 +49,7 @@ type Config struct {
|
|||
|
||||
func NewClient(config Config) Client {
|
||||
httpClient := &http.Client{
|
||||
Timeout: time.Second * 20,
|
||||
Timeout: config.Timeout,
|
||||
}
|
||||
|
||||
c := &client{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue