types: add option to disable taildrop, improve tests (#2955)
This commit is contained in:
parent
87bd67318b
commit
642073f4b8
6 changed files with 365 additions and 94 deletions
|
|
@ -94,6 +94,7 @@ type Config struct {
|
|||
|
||||
LogTail LogTailConfig
|
||||
RandomizeClientPort bool
|
||||
Taildrop TaildropConfig
|
||||
|
||||
CLI CLIConfig
|
||||
|
||||
|
|
@ -211,6 +212,10 @@ type LogTailConfig struct {
|
|||
Enabled bool
|
||||
}
|
||||
|
||||
type TaildropConfig struct {
|
||||
Enabled bool
|
||||
}
|
||||
|
||||
type CLIConfig struct {
|
||||
Address string
|
||||
APIKey string
|
||||
|
|
@ -382,6 +387,7 @@ func LoadConfig(path string, isFile bool) error {
|
|||
|
||||
viper.SetDefault("logtail.enabled", false)
|
||||
viper.SetDefault("randomize_client_port", false)
|
||||
viper.SetDefault("taildrop.enabled", true)
|
||||
|
||||
viper.SetDefault("ephemeral_node_inactivity_timeout", "120s")
|
||||
|
||||
|
|
@ -1048,6 +1054,9 @@ func LoadServerConfig() (*Config, error) {
|
|||
|
||||
LogTail: logTailConfig,
|
||||
RandomizeClientPort: randomizeClientPort,
|
||||
Taildrop: TaildropConfig{
|
||||
Enabled: viper.GetBool("taildrop.enabled"),
|
||||
},
|
||||
|
||||
Policy: policyConfig(),
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue