Reduced number of exported identifiers
This commit is contained in:
parent
ef6dd6885e
commit
d85c5fc1de
@ -31,7 +31,7 @@ type server struct {
|
||||
handlers []Handler
|
||||
router router.Router[Handler]
|
||||
errorHandler func(Context, error)
|
||||
config Configuration
|
||||
config config
|
||||
}
|
||||
|
||||
// NewServer creates a new HTTP server.
|
||||
|
@ -2,13 +2,13 @@ package web
|
||||
|
||||
import "time"
|
||||
|
||||
// Configuration represents the server configuration.
|
||||
type Configuration struct {
|
||||
Timeout TimeoutConfiguration `json:"timeout"`
|
||||
// config represents the server configuration.
|
||||
type config struct {
|
||||
Timeout timeoutConfig `json:"timeout"`
|
||||
}
|
||||
|
||||
// TimeoutConfiguration lets you configure the different timeout durations.
|
||||
type TimeoutConfiguration struct {
|
||||
// timeoutConfig lets you configure the different timeout durations.
|
||||
type timeoutConfig struct {
|
||||
Idle time.Duration `json:"idle"`
|
||||
Read time.Duration `json:"read"`
|
||||
ReadHeader time.Duration `json:"readHeader"`
|
||||
@ -17,9 +17,9 @@ type TimeoutConfiguration struct {
|
||||
}
|
||||
|
||||
// Reset resets all fields to the default configuration.
|
||||
func defaultConfig() Configuration {
|
||||
return Configuration{
|
||||
Timeout: TimeoutConfiguration{
|
||||
func defaultConfig() config {
|
||||
return config{
|
||||
Timeout: timeoutConfig{
|
||||
Idle: 3 * time.Minute,
|
||||
Write: 2 * time.Minute,
|
||||
Read: 5 * time.Second,
|
Loading…
Reference in New Issue
Block a user