1 Star 0 Fork 0

zhangjungang/beats

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
config.go 1.44 KB
一键复制 编辑 原始数据 按行查看 历史
package elasticsearch
import (
"time"
"github.com/elastic/beats/libbeat/outputs"
)
// config is subset of libbeat/outputs/elasticsearch config tailored
// for reporting metrics only
type config struct {
Hosts []string
Protocol string
Params map[string]string `config:"parameters"`
Headers map[string]string `config:"headers"`
Username string `config:"username"`
Password string `config:"password"`
ProxyURL string `config:"proxy_url"`
CompressionLevel int `config:"compression_level" validate:"min=0, max=9"`
TLS *outputs.TLSConfig `config:"ssl"`
MaxRetries int `config:"max_retries"`
Timeout time.Duration `config:"timeout"`
Period time.Duration `config:"period"`
BulkMaxSize int `config:"bulk_max_size" validate:"min=0"`
BufferSize int `config:"buffer_size"`
Tags []string `config:"tags"`
}
var defaultConfig = config{
Hosts: nil,
Protocol: "http",
Params: nil,
Headers: nil,
Username: "beats_system",
Password: "",
ProxyURL: "",
CompressionLevel: 0,
TLS: nil,
MaxRetries: 3,
Timeout: 60 * time.Second,
Period: 10 * time.Second,
BulkMaxSize: 50,
BufferSize: 50,
Tags: nil,
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhangjungang/beats.git
git@gitee.com:zhangjungang/beats.git
zhangjungang
beats
beats
v6.0.0-rc1

搜索帮助

344bd9b3 5694891 D2dac590 5694891