fix http_response compile error

This commit is contained in:
Ulric Qin 2021-05-06 17:00:18 +08:00
parent 967c3aa591
commit f70d303942
1 changed files with 2 additions and 2 deletions

View File

@ -149,10 +149,10 @@ func (p *Rule) TelegrafInput() (telegraf.Input, error) {
Log: plugins.GetLogger(),
ClientConfig: p.ClientConfig.TlsClientConfig(),
}
if err := plugins.SetValue(&input.ResponseTimeout.Duration, time.Second*time.Duration(p.ResponseTimeout)); err != nil {
if err := plugins.SetValue(&input.ResponseTimeout, time.Second*time.Duration(p.ResponseTimeout)); err != nil {
return nil, err
}
if err := plugins.SetValue(&input.ResponseBodyMaxSize.Size, int64(p.ResponseBodyMaxSize)*1024*1024); err != nil {
if err := plugins.SetValue(&input.ResponseBodyMaxSize, int64(p.ResponseBodyMaxSize)*1024*1024); err != nil {
return nil, err
}
return input, nil