From 0f3ae334e597752e1a9a11e6f4d6df3a10560f43 Mon Sep 17 00:00:00 2001 From: Angira Kekteeva Date: Wed, 13 Apr 2022 02:30:50 +0400 Subject: [PATCH] [#396] Remove unused parameters Signed-off-by: Angira Kekteeva --- cmd/s3-gw/app_settings.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/cmd/s3-gw/app_settings.go b/cmd/s3-gw/app_settings.go index 183108de..fee8c9f0 100644 --- a/cmd/s3-gw/app_settings.go +++ b/cmd/s3-gw/app_settings.go @@ -17,10 +17,6 @@ import ( ) const ( - minimumTTLInMinutes = 5 - - defaultTTL = minimumTTLInMinutes * time.Minute - defaultRebalanceTimer = 15 * time.Second defaultRequestTimeout = 15 * time.Second defaultConnectTimeout = 30 * time.Second @@ -44,7 +40,6 @@ const ( // Settings. cfgTLSCertFile = "tls.cert_file" // Timeouts. - cfgConnectionTTL = "con_ttl" cfgConnectTimeout = "connect_timeout" cfgRequestTimeout = "request_timeout" cfgRebalanceTimer = "rebalance_timer" @@ -81,9 +76,6 @@ const ( // Settings. cfgMaxClientsCount = "max_clients_count" cfgMaxClientsDeadline = "max_clients_deadline" - // gRPC. - cfgGRPCVerbose = "verbose" - // Metrics / Profiler / Web. cfgEnableMetrics = "metrics" cfgEnableProfiler = "pprof" @@ -188,7 +180,6 @@ func newSettings() *viper.Viper { flags.String(cfgAddress, "", `address of wallet account`) config := flags.String(cmdConfig, "", "config path") - flags.Bool(cfgGRPCVerbose, false, "set debug mode of gRPC connections") flags.Duration(cfgRequestTimeout, defaultRequestTimeout, "set gRPC request timeout") flags.Duration(cfgConnectTimeout, defaultConnectTimeout, "set gRPC connect timeout") flags.Duration(cfgRebalanceTimer, defaultRebalanceTimer, "set gRPC connection rebalance timer") @@ -196,8 +187,6 @@ func newSettings() *viper.Viper { flags.Int(cfgMaxClientsCount, defaultMaxClientsCount, "set max-clients count") flags.Duration(cfgMaxClientsDeadline, defaultMaxClientsDeadline, "set max-clients deadline") - ttl := flags.DurationP(cfgConnectionTTL, "t", defaultTTL, "set gRPC connection time to live") - flags.String(cfgListenAddress, "0.0.0.0:8080", "set address to listen") flags.String(cfgTLSCertFile, "", "TLS certificate file to use") flags.String(cfgTLSKeyFile, "", "TLS key file to use") @@ -272,8 +261,6 @@ func newSettings() *viper.Viper { case versionFlag != nil && *versionFlag: fmt.Printf("NeoFS S3 gateway %s\n", version.Version) os.Exit(0) - case ttl != nil && ttl.Minutes() < minimumTTLInMinutes: - fmt.Printf("connection ttl should not be less than %s", defaultTTL) } if v.IsSet(cmdConfig) {