types: add option to disable taildrop, improve tests (#2955)

This commit is contained in:
Kristoffer Dalby 2025-12-12 11:35:16 +01:00 committed by GitHub
parent 87bd67318b
commit 642073f4b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 365 additions and 94 deletions

View file

@ -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(),