Skip to content

Commit

Permalink
Add it as a command line option
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
  • Loading branch information
kozlovic committed Jan 6, 2021
1 parent be195d3 commit 2e417c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions nats-streaming-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Streaming Server Options:
--encrypt <bool> Specify if server should use encryption at rest
--encryption_cipher <string> Cipher to use for encryption. Currently support AES and CHAHA (ChaChaPoly). Defaults to AES
--encryption_key <string> Encryption Key. It is recommended to specify it through the NATS_STREAMING_ENCRYPTION_KEY environment variable instead
--replace_durable <bool> Replace the existing durable subscription instead of reporting a duplicate durable error
Streaming Server Clustering Options:
--clustered <bool> Run the server in a clustered configuration (default: false)
Expand Down
1 change: 1 addition & 0 deletions server/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,7 @@ func ConfigureOptions(fs *flag.FlagSet, args []string, printVersion, printHelp,
fs.BoolVar(&sopts.Encrypt, "encrypt", false, "Specify if server should use encryption at rest")
fs.StringVar(&sopts.EncryptionCipher, "encryption_cipher", stores.CryptoCipherAutoSelect, "Encryption cipher. Supported are AES and CHACHA (default is AES)")
fs.StringVar(&encryptionKey, "encryption_key", "", "Encryption Key. It is recommended to specify it through the NATS_STREAMING_ENCRYPTION_KEY environment variable instead")
fs.BoolVar(&sopts.ReplaceDurable, "replace_durable", false, "Replace the existing durable subscription instead of reporting a duplicate durable error")

// First, we need to call NATS's ConfigureOptions() with above flag set.
// It will be augmented with NATS specific flags and call fs.Parse(args) for us.
Expand Down

0 comments on commit 2e417c5

Please sign in to comment.