From 2e96ce6dcd4fbd7f5d849812e9b36808b734f895 Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Thu, 10 Jun 2021 11:15:32 +0300 Subject: [PATCH] [#73] Dropped grpc keepalive options Signed-off-by: Denis Kirillov --- README.md | 10 ++++++++++ cmd/s3-gw/app-settings.go | 11 ----------- cmd/s3-gw/app.go | 3 --- go.mod | 2 +- go.sum | 2 ++ 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 2c6ca8a6..33214257 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,16 @@ $ S3_GW_PEERS_0_ADDRESS=192.168.130.72:8080 \ S3_GW_AUTH-KEY=a04edd5b3c497eed83be25fb136bafd056928c17986440745775223615f2cbab \ neofs-s3-gw ``` +It's also possible to specify uri scheme (grpc or grpcs) when using `-p` or environment variables: +``` +$ neofs-s3-gw -p grpc://192.168.130.72:8080 --neofs-key KxDgvEKzgSBPPfuVfw67oPQBSjidEiqTHURKSDL1R7yGaGYAeYnr \ + --auth-key a04edd5b3c497eed83be25fb136bafd056928c17986440745775223615f2cbab + +$ S3_GW_PEERS_0_ADDRESS=grpcs://192.168.130.72:8080 \ + S3_GW_NEOFS-KEY=KxDgvEKzgSBPPfuVfw67oPQBSjidEiqTHURKSDL1R7yGaGYAeYnr \ + S3_GW_AUTH-KEY=a04edd5b3c497eed83be25fb136bafd056928c17986440745775223615f2cbab \ + neofs-s3-gw +``` ## Configuration diff --git a/cmd/s3-gw/app-settings.go b/cmd/s3-gw/app-settings.go index 50873f01..4ae6af3a 100644 --- a/cmd/s3-gw/app-settings.go +++ b/cmd/s3-gw/app-settings.go @@ -45,11 +45,6 @@ const ( // Settings. cfgLoggerSamplingInitial = "logger.sampling.initial" cfgLoggerSamplingThereafter = "logger.sampling.thereafter" - // KeepAlive. - cfgKeepaliveTime = "keepalive.time" - cfgKeepaliveTimeout = "keepalive.timeout" - cfgKeepalivePermitWithoutStream = "keepalive.permit_without_stream" - // Keys. cfgNeoFSPrivateKey = "neofs-key" cfgGateAuthPrivateKey = "auth-key" @@ -206,12 +201,6 @@ func newSettings() *viper.Viper { v.SetDefault(cfgLoggerSamplingInitial, 1000) v.SetDefault(cfgLoggerSamplingThereafter, 1000) - // keepalive: - // If set below 10s, a minimum value of 10s will be used instead. - v.SetDefault(cfgKeepaliveTime, defaultKeepaliveTime) - v.SetDefault(cfgKeepaliveTimeout, defaultKeepaliveTimeout) - v.SetDefault(cfgKeepalivePermitWithoutStream, true) - if err := v.BindPFlags(flags); err != nil { panic(err) } diff --git a/cmd/s3-gw/app.go b/cmd/s3-gw/app.go index cd1e4c7d..f5e848dc 100644 --- a/cmd/s3-gw/app.go +++ b/cmd/s3-gw/app.go @@ -111,9 +111,6 @@ func newApp(ctx context.Context, l *zap.Logger, v *viper.Viper) *App { NodeRequestTimeout: reqTimeout, ClientRebalanceInterval: reBalance, SessionExpirationEpoch: math.MaxUint64, - KeepaliveTime: v.GetDuration(cfgKeepaliveTime), - KeepaliveTimeout: v.GetDuration(cfgKeepaliveTimeout), - KeepalivePermitWoStream: v.GetBool(cfgKeepalivePermitWithoutStream), } conns, err = poolPeers.Build(ctx, opts) if err != nil { diff --git a/go.mod b/go.mod index 2f1ee8eb..6e9f1a9d 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/nspcc-dev/neofs-api-go v1.27.0 github.com/nspcc-dev/neofs-crypto v0.3.0 github.com/nspcc-dev/neofs-node v1.22.0 - github.com/nspcc-dev/neofs-sdk-go v0.0.0-20210604112451-f16d38c7b92a + github.com/nspcc-dev/neofs-sdk-go v0.0.0-20210609143631-0d3c078a0d9b github.com/prometheus/client_golang v1.9.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.7.1 diff --git a/go.sum b/go.sum index 2f36ff38..d797c816 100644 --- a/go.sum +++ b/go.sum @@ -344,6 +344,8 @@ github.com/nspcc-dev/neofs-node v1.22.0 h1:TJ4d5zopItYYWMEajegVWBgAw8HjZFe12IkNm github.com/nspcc-dev/neofs-node v1.22.0/go.mod h1:ecpXrzIe1vcp5FBjPsIaHKVIVvxsv4GVBCw21WYcY3c= github.com/nspcc-dev/neofs-sdk-go v0.0.0-20210604112451-f16d38c7b92a h1:bVvyR+Y+UmElTFKY0ifjtvWteYSm93jihKV1rh4wW5s= github.com/nspcc-dev/neofs-sdk-go v0.0.0-20210604112451-f16d38c7b92a/go.mod h1:1djNrOkpTTbNUlJM/MvTmohJUaWKUMy9JHSCCA8rJEc= +github.com/nspcc-dev/neofs-sdk-go v0.0.0-20210609143631-0d3c078a0d9b h1:2alc6tGPHScEATOxlrYuHCTl+DbhVaqigT5Bo1QXY90= +github.com/nspcc-dev/neofs-sdk-go v0.0.0-20210609143631-0d3c078a0d9b/go.mod h1:1djNrOkpTTbNUlJM/MvTmohJUaWKUMy9JHSCCA8rJEc= github.com/nspcc-dev/rfc6979 v0.1.0/go.mod h1:exhIh1PdpDC5vQmyEsGvc4YDM/lyQp/452QxGq/UEso= github.com/nspcc-dev/rfc6979 v0.2.0 h1:3e1WNxrN60/6N0DW7+UYisLeZJyfqZTNOjeV/toYvOE= github.com/nspcc-dev/rfc6979 v0.2.0/go.mod h1:exhIh1PdpDC5vQmyEsGvc4YDM/lyQp/452QxGq/UEso=