-
Notifications
You must be signed in to change notification settings - Fork 40
/
config.go
45 lines (39 loc) · 1.24 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
33
34
35
36
37
38
39
40
41
42
43
44
45
package config
import (
"github.com/elastic/beats/libbeat/outputs"
"time"
)
// Defaults for config variables which are not set
const (
DefaultSchedule string = "@every 1m"
DefaultTimeout time.Duration = 60 * time.Second
DefaultDocumentType string = "httpbeat"
DefaultOutputFormat string = "string"
DefaultJsonDotModeCharacter string = "_"
)
type HttpbeatConfig struct {
Hosts []HostConfig
}
type HostConfig struct {
Schedule string
Url string
BasicAuth BasicAuthenticationConfig `config:"basic_auth"`
Method string
Body string
Headers map[string]string
ProxyUrl string `config:"proxy_url"`
Timeout *int64
DocumentType string `config:"document_type"`
Fields map[string]string `config:"fields"`
SSL *outputs.TLSConfig
OutputFormat string `config:"output_format"`
JsonDotMode string `config:"json_dot_mode"`
JsonDotModeCharacter string `config:"json_dot_mode_character"`
}
type BasicAuthenticationConfig struct {
Username string
Password string
}
type ConfigSettings struct {
Httpbeat HttpbeatConfig
}