Skip to content

Commit

Permalink
feat(config): read write timeout value
Browse files Browse the repository at this point in the history
This commit adds a write timeout configuration parameter. As it is part
of the downloading cycle, it is available under
`blocking/loading/downloads`.
The default value comes from `server/http.go` line 23.

Refs: 0xERR0R#1606
  • Loading branch information
TheoTechnicguy committed Dec 4, 2024
1 parent aff2998 commit 3b067e0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,10 @@ func recoverToError(do func(context.Context) error, onPanic func(any) error) fun
}

type Downloader struct {
Timeout Duration `yaml:"timeout" default:"5s"`
Attempts uint `yaml:"attempts" default:"3"`
Cooldown Duration `yaml:"cooldown" default:"500ms"`
Timeout Duration `yaml:"timeout" default:"5s"`
WriteTimeout Duration `yaml:"writeTimeout" default:"20s"`
Attempts uint `yaml:"attempts" default:"3"`
Cooldown Duration `yaml:"cooldown" default:"500ms"`
}

func (c *Downloader) LogConfig(logger *logrus.Entry) {
Expand Down

0 comments on commit 3b067e0

Please sign in to comment.