Merge pull request #74 from KirillovDenis/feature/73-drop_grpc_options
[#73] Dropped grpc keepalive options
This commit is contained in:
commit
12b92a31c6
5 changed files with 13 additions and 15 deletions
10
README.md
10
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
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
2
go.mod
2
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
|
||||
|
|
2
go.sum
2
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=
|
||||
|
|
Loading…
Reference in a new issue