Skip to content

Commit

Permalink
Normalize config params
Browse files Browse the repository at this point in the history
  • Loading branch information
iknite committed Feb 4, 2019
1 parent 9f2ee3b commit ace29e4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ func newStartCommand(ctx *cmdContext) *cobra.Command {
v.BindPFlag("server.tls.certificate_key", f.Lookup("certificate-key"))

v.BindPFlag("server.addr.http", f.Lookup("http-addr"))
v.BindPFlag("server.addr.raft", f.Lookup("raft-addr"))
v.BindPFlag("server.addr.mgmt", f.Lookup("mgmt-addr"))
v.BindPFlag("server.addr.join", f.Lookup("join-addr"))
v.BindPFlag("server.addr.raft", f.Lookup("raft-addr"))
v.BindPFlag("server.addr.raft_join", f.Lookup("join-addr"))
v.BindPFlag("server.addr.gossip", f.Lookup("gossip-addr"))
v.BindPFlag("server.addr.gossip_join", f.Lookup("gossip-join-addr"))

Expand Down
17 changes: 9 additions & 8 deletions config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,30 @@

log: error # Choose between log levels: silent, error, info and debug.
api_key: "my-key" # The application namespace used in all the nodes.
path: "/var/tmp/qed/" # Set root path used for dbpath, raftpath, private key and certificates.

###############################################################################
# Server Configuration (where it collect and processes events).
###############################################################################
server:
node_id: "hostname" # Unique name for node. If not set, fallback to hostname.
profiling: false # Allow a pprof url (localhost:6060) for profiling purposes.
key: "~/.ssh/id_ed25519" # Path to the ed25519 key file.
key: "/var/tmp/qed/id_ed25519" # Path to the ed25519 key file.
tls:
certificate: "~/.ssh/server.crt" # Server certificate file
certificate_key: "~/.ssh/server.key" # Server certificate key file
certificate: "/var/tmp/qed/server.crt" # Server certificate file
certificate_key: "/var/tmp/qed/server.key" # Server certificate key file
addr:
http: ":8080" # Endpoint for REST requests on (host:port).
mgmt: ":8090" # Management endpoint bind address (host:port).
raft: ":9000" # Raft bind address (host:port).
join: # Raft: list of nodes ([host]:port), through which a cluster can be joined.
raft_join: # Raft: list of nodes ([host]:port), through which a cluster can be joined.
- "127.0.0.1:9000"
gossip: "9100" # Gossip: management endpoint bind address (host:port).
gossip: ":9100" # Gossip: management endpoint bind address (host:port).
gossip_join: # Gossip: list of nodes ([host]:port), through which a cluster can be joined.
- "127.0.0.0.1:9100"
path:
db: "/var/tmp/qed/data" # Set default storage path.
wal: "/var/tmp/qed/raft" # Set raft storage path.
path:
db: "/var/tmp/qed/db" # Set default storage path.
wal: "/var/tmp/qed/wal" # Set raft storage path.


###############################################################################
Expand Down
1 change: 1 addition & 0 deletions server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func DefaultConfig() *Config {
currentDir := getCurrentDir()

return &Config{
APIKey: "",
NodeID: hostname,
HTTPAddr: "127.0.0.1:8080",
RaftAddr: "127.0.0.1:9000",
Expand Down

0 comments on commit ace29e4

Please sign in to comment.