lint: Http -> HTTP
This commit is contained in:
parent
a78fac6d7f
commit
0ecd126ae8
2 changed files with 10 additions and 10 deletions
|
@ -91,9 +91,9 @@ type TrackerConfig struct {
|
|||
type HTTPConfig struct {
|
||||
ListenAddr string `json:"http_listen_addr"`
|
||||
RequestTimeout Duration `json:"http_request_timeout"`
|
||||
HttpReadTimeout Duration `json:"http_read_timeout"`
|
||||
HttpWriteTimeout Duration `json:"http_write_timeout"`
|
||||
HttpListenLimit int `json:"http_listen_limit"`
|
||||
HTTPReadTimeout Duration `json:"http_read_timeout"`
|
||||
HTTPWriteTimeout Duration `json:"http_write_timeout"`
|
||||
HTTPListenLimit int `json:"http_listen_limit"`
|
||||
}
|
||||
|
||||
// Config is the global configuration for an instance of Chihaya.
|
||||
|
@ -129,8 +129,8 @@ var DefaultConfig = Config{
|
|||
HTTPConfig: HTTPConfig{
|
||||
ListenAddr: ":6881",
|
||||
RequestTimeout: Duration{10 * time.Second},
|
||||
HttpReadTimeout: Duration{10 * time.Second},
|
||||
HttpWriteTimeout: Duration{10 * time.Second},
|
||||
HTTPReadTimeout: Duration{10 * time.Second},
|
||||
HTTPWriteTimeout: Duration{10 * time.Second},
|
||||
},
|
||||
|
||||
DriverConfig: DriverConfig{
|
||||
|
|
10
http/http.go
10
http/http.go
|
@ -127,19 +127,19 @@ func Serve(cfg *config.Config, tkr *tracker.Tracker) {
|
|||
}
|
||||
|
||||
glog.V(0).Info("Starting on ", cfg.ListenAddr)
|
||||
if cfg.HttpListenLimit != 0 {
|
||||
glog.V(0).Info("Limiting connections to ", cfg.HttpListenLimit)
|
||||
if cfg.HTTPListenLimit != 0 {
|
||||
glog.V(0).Info("Limiting connections to ", cfg.HTTPListenLimit)
|
||||
}
|
||||
|
||||
grace := &graceful.Server{
|
||||
Timeout: cfg.RequestTimeout.Duration,
|
||||
ConnState: srv.connState,
|
||||
ListenLimit: cfg.HttpListenLimit,
|
||||
ListenLimit: cfg.HTTPListenLimit,
|
||||
Server: &http.Server{
|
||||
Addr: cfg.ListenAddr,
|
||||
Handler: newRouter(srv),
|
||||
ReadTimeout: cfg.HttpReadTimeout.Duration,
|
||||
WriteTimeout: cfg.HttpWriteTimeout.Duration,
|
||||
ReadTimeout: cfg.HTTPReadTimeout.Duration,
|
||||
WriteTimeout: cfg.HTTPWriteTimeout.Duration,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue