forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.go
32 lines (28 loc) · 1.03 KB
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package logstash
import (
"time"
"github.com/elastic/beats/libbeat/outputs"
"github.com/elastic/beats/libbeat/outputs/transport"
)
type logstashConfig struct {
Index string `config:"index"`
Port int `config:"port"`
LoadBalance bool `config:"loadbalance"`
BulkMaxSize int `config:"bulk_max_size"`
Timeout time.Duration `config:"timeout"`
Pipelining int `config:"pipelining" validate:"min=0"`
CompressionLevel int `config:"compression_level" validate:"min=0, max=9"`
MaxRetries int `config:"max_retries" validate:"min=-1"`
TLS *outputs.TLSConfig `config:"ssl"`
Proxy transport.ProxyConfig `config:",inline"`
}
var (
defaultConfig = logstashConfig{
Port: 10200,
LoadBalance: false,
BulkMaxSize: 2048,
CompressionLevel: 3,
Timeout: 30 * time.Second,
MaxRetries: 3,
}
)