app: add support for TLS key/cert options
Run in TLS mode if anything is specified.
This commit is contained in:
parent
a6f63c2bac
commit
491ae13190
3 changed files with 20 additions and 3 deletions
|
@ -26,7 +26,9 @@ const (
|
|||
defaultKeepaliveTime = 10 * time.Second
|
||||
defaultKeepaliveTimeout = 10 * time.Second
|
||||
|
||||
cfgListenAddress = "listen_address"
|
||||
cfgListenAddress = "listen_address"
|
||||
cfgTLSCertificate = "tls_certificate"
|
||||
cfgTLSKey = "tls_key"
|
||||
|
||||
// KeepAlive
|
||||
cfgKeepaliveTime = "keepalive.time"
|
||||
|
@ -112,6 +114,8 @@ func settings() *viper.Viper {
|
|||
flags.Duration(cfgRebalance, defaultRebalanceTimer, "gRPC connection rebalance timer")
|
||||
|
||||
flags.String(cfgListenAddress, "0.0.0.0:8082", "address to listen")
|
||||
flags.String(cfgTLSCertificate, "", "TLS certificate path")
|
||||
flags.String(cfgTLSKey, "", "TLS key path")
|
||||
peers := flags.StringArrayP(cfgPeers, "p", nil, "NeoFS nodes")
|
||||
|
||||
// set prefers:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue