-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add disable_http_keep_alive option #1035
Changes from 4 commits
935ed7a
11d9b02
c127806
fb780e6
7022f7c
05dcf6b
4474546
78589bd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -93,23 +93,24 @@ func (c *CloudPlatform) UnmarshalText(text []byte) error { | |||
|
||||
// Config represents mackerel-agent's configuration file. | ||||
type Config struct { | ||||
Apibase string | ||||
Apikey string | ||||
Root string | ||||
Pidfile string | ||||
Conffile string | ||||
Roles []string | ||||
Verbose bool | ||||
Silent bool | ||||
Diagnostic bool `toml:"diagnostic"` | ||||
DisplayName string `toml:"display_name"` | ||||
HostStatus HostStatus `toml:"host_status" conf:"parent"` | ||||
Disks Disks `toml:"disks" conf:"parent"` | ||||
Filesystems Filesystems `toml:"filesystems" conf:"parent"` | ||||
Interfaces Interfaces `toml:"interfaces" conf:"parent"` | ||||
HTTPProxy string `toml:"http_proxy"` | ||||
HTTPSProxy string `toml:"https_proxy"` | ||||
CloudPlatform CloudPlatform `toml:"cloud_platform"` | ||||
Apibase string | ||||
Apikey string | ||||
Root string | ||||
Pidfile string | ||||
Conffile string | ||||
Roles []string | ||||
Verbose bool | ||||
Silent bool | ||||
Diagnostic bool `toml:"diagnostic"` | ||||
DisableKeepAlive bool `toml:"disable_keep_alive"` | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed it to mackerel-agent/config/config.go Line 105 in 12e1b6e
|
||||
DisplayName string `toml:"display_name"` | ||||
HostStatus HostStatus `toml:"host_status" conf:"parent"` | ||||
Disks Disks `toml:"disks" conf:"parent"` | ||||
Filesystems Filesystems `toml:"filesystems" conf:"parent"` | ||||
Interfaces Interfaces `toml:"interfaces" conf:"parent"` | ||||
HTTPProxy string `toml:"http_proxy"` | ||||
HTTPSProxy string `toml:"https_proxy"` | ||||
CloudPlatform CloudPlatform `toml:"cloud_platform"` | ||||
|
||||
// This Plugin field is used to decode the toml file. After reading the | ||||
// configuration from file, this field is set to nil. | ||||
|
@@ -447,6 +448,9 @@ func LoadConfig(conffile string) (*Config, error) { | |||
if !config.Diagnostic { | ||||
config.Diagnostic = DefaultConfig.Diagnostic | ||||
} | ||||
if !config.DisableKeepAlive { | ||||
config.DisableKeepAlive = DefaultConfig.DisableKeepAlive | ||||
} | ||||
|
||||
return config, err | ||||
} | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[may]
In all the tests that call NewMackerelClient, you set the disableKeepAlive parameter to true. However, in the previous version, this parameter was implicitly set to false.
While I believe this change does not introduce any issues, it is preferable not to introduce such changes unnecessarily.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it 7022f7c