From 99ef1394004091a512f986f0feca41d196c7b86d Mon Sep 17 00:00:00 2001 From: Bram Schuur Date: Tue, 20 Aug 2024 15:07:31 +0200 Subject: [PATCH] STAC-21470: Fix command line --- cmd/root.go | 1 + internal/config/config.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index 85b64e4..7f32aa3 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -72,6 +72,7 @@ Additional targets are configured via PUT/DELETE on the '/targets?url= cmd.Flags().String("password", "", "Password to protect the configuration 'targets' endpoint with.") cmd.Flags().String("passwordFile", "", "Provide a file that contains username/password to protect the configuration 'targets' endpoint. Contains 1 username/password combination separated by ':'.") cmd.Flags().Int("fail-after", 30, "Remove a target when it has been failing for this many minutes.") //nolint:gomnd + cmd.Flags().Int("max-queued-requests", 500, "Maximum amount of requests queued per mirror.") //nolint:gomnd cmd.Flags().Int("retry-after", 1, "After 5 successive failures a target is temporarily disabled, it will be retried after this many minutes.") cmd.Flags().StringSlice("mirror", []string{}, "Start with mirroring traffic to provided targets") diff --git a/internal/config/config.go b/internal/config/config.go index 6fc1f79..9d0ae31 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -15,7 +15,7 @@ type Config struct { PersistentFailureTimeout int `yaml:"fail-after" default:"30"` RetryAfter int `yaml:"retry-after" default:"1"` Mirrors []string `yaml:"mirror"` - MaxQueuedRequests int `yaml:"maxQueuedRequests" default:"500"` + MaxQueuedRequests int `yaml:"max-queued-requests" default:"500"` } func (s *Config) UnmarshalYAML(unmarshal func(interface{}) error) error {