forked from TrueCloudLab/frostfs-s3-gw
[#396] Remove unused parameters
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
This commit is contained in:
parent
d3e71f567e
commit
0f3ae334e5
1 changed files with 0 additions and 13 deletions
|
@ -17,10 +17,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
minimumTTLInMinutes = 5
|
|
||||||
|
|
||||||
defaultTTL = minimumTTLInMinutes * time.Minute
|
|
||||||
|
|
||||||
defaultRebalanceTimer = 15 * time.Second
|
defaultRebalanceTimer = 15 * time.Second
|
||||||
defaultRequestTimeout = 15 * time.Second
|
defaultRequestTimeout = 15 * time.Second
|
||||||
defaultConnectTimeout = 30 * time.Second
|
defaultConnectTimeout = 30 * time.Second
|
||||||
|
@ -44,7 +40,6 @@ const ( // Settings.
|
||||||
cfgTLSCertFile = "tls.cert_file"
|
cfgTLSCertFile = "tls.cert_file"
|
||||||
|
|
||||||
// Timeouts.
|
// Timeouts.
|
||||||
cfgConnectionTTL = "con_ttl"
|
|
||||||
cfgConnectTimeout = "connect_timeout"
|
cfgConnectTimeout = "connect_timeout"
|
||||||
cfgRequestTimeout = "request_timeout"
|
cfgRequestTimeout = "request_timeout"
|
||||||
cfgRebalanceTimer = "rebalance_timer"
|
cfgRebalanceTimer = "rebalance_timer"
|
||||||
|
@ -81,9 +76,6 @@ const ( // Settings.
|
||||||
cfgMaxClientsCount = "max_clients_count"
|
cfgMaxClientsCount = "max_clients_count"
|
||||||
cfgMaxClientsDeadline = "max_clients_deadline"
|
cfgMaxClientsDeadline = "max_clients_deadline"
|
||||||
|
|
||||||
// gRPC.
|
|
||||||
cfgGRPCVerbose = "verbose"
|
|
||||||
|
|
||||||
// Metrics / Profiler / Web.
|
// Metrics / Profiler / Web.
|
||||||
cfgEnableMetrics = "metrics"
|
cfgEnableMetrics = "metrics"
|
||||||
cfgEnableProfiler = "pprof"
|
cfgEnableProfiler = "pprof"
|
||||||
|
@ -188,7 +180,6 @@ func newSettings() *viper.Viper {
|
||||||
flags.String(cfgAddress, "", `address of wallet account`)
|
flags.String(cfgAddress, "", `address of wallet account`)
|
||||||
config := flags.String(cmdConfig, "", "config path")
|
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(cfgRequestTimeout, defaultRequestTimeout, "set gRPC request timeout")
|
||||||
flags.Duration(cfgConnectTimeout, defaultConnectTimeout, "set gRPC connect timeout")
|
flags.Duration(cfgConnectTimeout, defaultConnectTimeout, "set gRPC connect timeout")
|
||||||
flags.Duration(cfgRebalanceTimer, defaultRebalanceTimer, "set gRPC connection rebalance timer")
|
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.Int(cfgMaxClientsCount, defaultMaxClientsCount, "set max-clients count")
|
||||||
flags.Duration(cfgMaxClientsDeadline, defaultMaxClientsDeadline, "set max-clients deadline")
|
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(cfgListenAddress, "0.0.0.0:8080", "set address to listen")
|
||||||
flags.String(cfgTLSCertFile, "", "TLS certificate file to use")
|
flags.String(cfgTLSCertFile, "", "TLS certificate file to use")
|
||||||
flags.String(cfgTLSKeyFile, "", "TLS key file to use")
|
flags.String(cfgTLSKeyFile, "", "TLS key file to use")
|
||||||
|
@ -272,8 +261,6 @@ func newSettings() *viper.Viper {
|
||||||
case versionFlag != nil && *versionFlag:
|
case versionFlag != nil && *versionFlag:
|
||||||
fmt.Printf("NeoFS S3 gateway %s\n", version.Version)
|
fmt.Printf("NeoFS S3 gateway %s\n", version.Version)
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
case ttl != nil && ttl.Minutes() < minimumTTLInMinutes:
|
|
||||||
fmt.Printf("connection ttl should not be less than %s", defaultTTL)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if v.IsSet(cmdConfig) {
|
if v.IsSet(cmdConfig) {
|
||||||
|
|
Loading…
Reference in a new issue