1 Star 0 Fork 0

zhangjungang/beats

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
config.go 670 Bytes
Copy Edit Raw Blame History
package prospector
import (
"time"
cfg "github.com/elastic/beats/filebeat/config"
"github.com/elastic/beats/libbeat/common/cfgwarn"
)
var (
defaultConfig = prospectorConfig{
ScanFrequency: 10 * time.Second,
Type: cfg.DefaultType,
}
)
type prospectorConfig struct {
ScanFrequency time.Duration `config:"scan_frequency" validate:"min=0,nonzero"`
Type string `config:"type"`
InputType string `config:"input_type"`
}
func (c *prospectorConfig) Validate() error {
if c.InputType != "" {
cfgwarn.Deprecate("6.0.0", "input_type prospector config is deprecated. Use type instead.")
c.Type = c.InputType
}
return nil
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhangjungang/beats.git
git@gitee.com:zhangjungang/beats.git
zhangjungang
beats
beats
v6.1.2

Search