Encrypt serf communications

This commit is contained in:
Tobie Morgan Hitchcock 2016-07-18 23:01:49 +01:00
parent 26fb5c5684
commit 1933b3e712
2 changed files with 3 additions and 0 deletions

View file

@ -17,6 +17,8 @@ package cnf
// Options defines global configuration options
type Options struct {
DB struct {
Key []byte // Data encryption key
Code string // Data encruption key string
Path string // Path to store the data file
Host string // Surreal host to connect to
Port string // Surreal port to connect to

View file

@ -43,6 +43,7 @@ func Setup(opts *cnf.Options) (err error) {
cfg.MemberlistConfig.LogOutput = ioutil.Discard
cfg.MemberlistConfig.SecretKey = opts.DB.Key
cfg.MemberlistConfig.BindPort = opts.Port.Tcp
cfg.MemberlistConfig.AdvertisePort = opts.Port.Tcp