Reduced number of exported identifiers
This commit is contained in:
parent
d1e052d352
commit
1dc158eb03
2 changed files with 9 additions and 9 deletions
|
@ -1,30 +0,0 @@
|
|||
package web
|
||||
|
||||
import "time"
|
||||
|
||||
// Configuration represents the server configuration.
|
||||
type Configuration struct {
|
||||
Timeout TimeoutConfiguration `json:"timeout"`
|
||||
}
|
||||
|
||||
// TimeoutConfiguration lets you configure the different timeout durations.
|
||||
type TimeoutConfiguration struct {
|
||||
Idle time.Duration `json:"idle"`
|
||||
Read time.Duration `json:"read"`
|
||||
ReadHeader time.Duration `json:"readHeader"`
|
||||
Write time.Duration `json:"write"`
|
||||
Shutdown time.Duration `json:"shutdown"`
|
||||
}
|
||||
|
||||
// Reset resets all fields to the default configuration.
|
||||
func defaultConfig() Configuration {
|
||||
return Configuration{
|
||||
Timeout: TimeoutConfiguration{
|
||||
Idle: 3 * time.Minute,
|
||||
Write: 2 * time.Minute,
|
||||
Read: 5 * time.Second,
|
||||
ReadHeader: 5 * time.Second,
|
||||
Shutdown: 250 * time.Millisecond,
|
||||
},
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue