Skip to content

Commit

Permalink
Merge 044bacb into 5e1a582
Browse files Browse the repository at this point in the history
  • Loading branch information
haseebq committed Aug 13, 2015
2 parents 5e1a582 + 044bacb commit 2c5e8d0
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ Authorization Options:
--pass password Password required for connections
Cluster Options:
--cluster_port PORT Use PORT for incomming route connections
--cluster_addr HOST Bind to HOST address for incomming route connections
--cluster_user user User required for incomming route connections
--cluster_pass password Password required for incomming route connections
--routes [rurl-1, rurl-2] Routes to solicit and connect
Common Options:
Expand Down
4 changes: 4 additions & 0 deletions gnatsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ func main() {
flag.StringVar(&opts.Host, "addr", "", "Network host to listen on.")
flag.StringVar(&opts.Host, "a", "", "Network host to listen on.")
flag.StringVar(&opts.Host, "net", "", "Network host to listen on.")
flag.IntVar(&opts.ClusterPort, "cluster_port", 0, "Port to listen on for incomming route connections.")
flag.StringVar(&opts.ClusterHost, "cluster_addr", "", "Network host to listen on for incomming route connections.")
flag.StringVar(&opts.ClusterUsername, "cluster_user", "", "Username required for incomming route connections.")
flag.StringVar(&opts.ClusterPassword, "cluster_pass", "", "Password required for incomming route connections.")
flag.BoolVar(&opts.Debug, "D", false, "Enable Debug logging.")
flag.BoolVar(&opts.Debug, "debug", false, "Enable Debug logging.")
flag.BoolVar(&opts.Trace, "V", false, "Enable Trace logging.")
Expand Down
12 changes: 12 additions & 0 deletions server/opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,18 @@ func MergeOptions(fileOpts, flagOpts *Options) *Options {
if flagOpts.ProfPort != 0 {
opts.ProfPort = flagOpts.ProfPort
}
if flagOpts.ClusterPort != 0 {
opts.ClusterPort = flagOpts.ClusterPort
}
if flagOpts.ClusterHost != "" {
opts.ClusterHost = flagOpts.ClusterHost
}
if flagOpts.ClusterPassword != "" {
opts.ClusterPassword = flagOpts.ClusterPassword
}
if flagOpts.ClusterUsername != "" {
opts.ClusterUsername = flagOpts.ClusterUsername
}
if flagOpts.RoutesStr != "" {
mergeRoutes(&opts, flagOpts)
}
Expand Down
4 changes: 4 additions & 0 deletions server/usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ Authorization Options:
--pass password Password required for connections
Cluster Options:
--cluster_port PORT Use PORT for incomming route connections
--cluster_addr HOST Bind to HOST address for incomming route connections
--cluster_user user User required for incomming route connections
--cluster_pass password Password required for incomming route connections
--routes [rurl-1, rurl-2] Routes to solicit and connect
Common Options:
Expand Down

0 comments on commit 2c5e8d0

Please sign in to comment.