forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.go
50 lines (43 loc) · 1.11 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
46
47
48
49
50
package config
import (
"time"
"github.com/elastic/beats/libbeat/common"
"github.com/elastic/beats/libbeat/common/droppriv"
"github.com/elastic/beats/libbeat/logp"
"github.com/elastic/beats/libbeat/publisher"
"github.com/elastic/beats/packetbeat/procs"
)
type Config struct {
Interfaces InterfacesConfig
Flows *Flows
Protocols map[string]*common.Config
Shipper publisher.ShipperConfig
Procs procs.ProcsConfig
RunOptions droppriv.RunOptions
Logging logp.Logging
}
type InterfacesConfig struct {
Device string
Type string
File string
With_vlans bool
Bpf_filter string
Snaplen int
Buffer_size_mb int
TopSpeed bool
Dumpfile string
OneAtATime bool
Loop int
}
type Flows struct {
Timeout string
Period string
}
type ProtocolCommon struct {
Ports []int `config:"ports"`
SendRequest bool `config:"send_request"`
SendResponse bool `config:"send_response"`
TransactionTimeout time.Duration `config:"transaction_timeout"`
}
// Config Singleton
var ConfigSingleton Config