NewDefaultConfig returns default config values
()
| 63 | |
| 64 | // NewDefaultConfig returns default config values |
| 65 | func NewDefaultConfig() Config { |
| 66 | return Config{ |
| 67 | Network: "tcp", |
| 68 | Bind: ":8080", |
| 69 | PathPrefix: "", |
| 70 | MaxClients: 2048, |
| 71 | RequestTimeout: 10 * time.Second, |
| 72 | ReadRequestTimeout: 10 * time.Second, |
| 73 | KeepAliveTimeout: 10 * time.Second, |
| 74 | GracefulStopTimeout: 20 * time.Second, |
| 75 | CORSAllowOrigin: "", |
| 76 | Secret: "", |
| 77 | DevelopmentErrorsMode: false, |
| 78 | SocketReusePort: false, |
| 79 | HealthCheckPath: "", |
| 80 | FreeMemoryInterval: 10 * time.Second, |
| 81 | LogMemStats: false, |
| 82 | |
| 83 | ResponseWriter: responsewriter.NewDefaultConfig(), |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | // LoadConfigFromEnv overrides current values with environment variables |
| 88 | func LoadConfigFromEnv(c *Config) (*Config, error) { |