-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- update output plugins to use ucfg.Config - removing MothershipConfig - local config.go with default config for each output plugin
- Loading branch information
urso
committed
Mar 2, 2016
1 parent
8c2effb
commit 5ef56c0
Showing
27 changed files
with
476 additions
and
418 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package console | ||
|
||
type config struct { | ||
Pretty bool `config:"pretty"` | ||
} | ||
|
||
var ( | ||
defaultConfig = config{ | ||
Pretty: false, | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package elasticsearch | ||
|
||
import "github.com/elastic/beats/libbeat/outputs" | ||
|
||
type elasticsearchConfig struct { | ||
Protocol string `config:"protocol"` | ||
Path string `config:"path"` | ||
Params map[string]string `config:"parameters"` | ||
Username string `config:"username"` | ||
Password string `config:"password"` | ||
ProxyURL string `config:"proxy_url"` | ||
Index string `config:"index"` | ||
LoadBalance bool `config:"loadbalance"` | ||
TLS *outputs.TLSConfig `config:"tls"` | ||
MaxRetries int `config:"max_retries"` | ||
Timeout int `config:"timeout"` | ||
SaveTopology bool `config:"save_topology"` | ||
Template Template `config:"template"` | ||
} | ||
|
||
type Template struct { | ||
Name string `config:"name"` | ||
Path string `config:"path"` | ||
Overwrite bool `config:"overwrite"` | ||
} | ||
|
||
const ( | ||
defaultBulkSize = 50 | ||
) | ||
|
||
var ( | ||
defaultConfig = elasticsearchConfig{ | ||
Protocol: "", | ||
Path: "", | ||
ProxyURL: "", | ||
Params: nil, | ||
Username: "", | ||
Password: "", | ||
Timeout: 90, | ||
MaxRetries: 3, | ||
TLS: nil, | ||
LoadBalance: true, | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package fileout | ||
|
||
type config struct { | ||
Index string `config:"index"` | ||
Path string `config:"path"` | ||
Filename string `config:"filename"` | ||
RotateEveryKb int `config:"rotate_every_kb"` | ||
NumberOfFiles int `config:"number_of_files"` | ||
} | ||
|
||
var ( | ||
defaultConfig = config{ | ||
NumberOfFiles: 7, | ||
RotateEveryKb: 10 * 1024, | ||
} | ||
) |
Oops, something went wrong.