usage.go 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. package server
  2. import (
  3. "strings"
  4. )
  5. // usage defines the message shown when a help flag is passed to etcd.
  6. var usage = `
  7. etcd
  8. Usage:
  9. etcd -name <name>
  10. etcd -name <name> [-data-dir=<path>]
  11. etcd -h | -help
  12. etcd -version
  13. Options:
  14. -h -help Show this screen.
  15. --version Show version.
  16. -f -force Force a new configuration to be used.
  17. -config=<path> Path to configuration file.
  18. -name=<name> Name of this node in the etcd cluster.
  19. -data-dir=<path> Path to the data directory.
  20. -cors=<origins> Comma-separated list of CORS origins.
  21. -v Enabled verbose logging.
  22. -vv Enabled very verbose logging.
  23. Cluster Configuration Options:
  24. -discovery=<url> Discovery service used to find a peer list.
  25. -peers-file=<path> Path to a file containing the peer list.
  26. -peers=<host:port>,<host:port> Comma-separated list of peers. The members
  27. should match the peer's '-peer-addr' flag.
  28. Client Communication Options:
  29. -addr=<host:port> The public host:port used for client communication.
  30. -bind-addr=<host[:port]> The listening host:port used for client communication.
  31. -ca-file=<path> Path to the client CA file.
  32. -cert-file=<path> Path to the client cert file.
  33. -key-file=<path> Path to the client key file.
  34. Peer Communication Options:
  35. -peer-addr=<host:port> The public host:port used for peer communication.
  36. -peer-bind-addr=<host[:port]> The listening host:port used for peer communication.
  37. -peer-ca-file=<path> Path to the peer CA file.
  38. -peer-cert-file=<path> Path to the peer cert file.
  39. -peer-key-file=<path> Path to the peer key file.
  40. -peer-heartbeat-interval=<time>
  41. Time (in milliseconds) of a heartbeat interval.
  42. -peer-election-timeout=<time>
  43. Time (in milliseconds) for an election to timeout.
  44. Other Options:
  45. -max-result-buffer Max size of the result buffer.
  46. -max-retry-attempts Number of times a node will try to join a cluster.
  47. -retry-interval Seconds to wait between cluster join retry attempts.
  48. -snapshot=false Disable log snapshots
  49. -snapshot-count Number of transactions before issuing a snapshot.
  50. -cluster-active-size Number of active nodes in the cluster.
  51. -cluster-remove-delay Seconds before one node is removed.
  52. -cluster-sync-interval Seconds between synchronizations for standby mode.
  53. `
  54. // Usage returns the usage message for etcd.
  55. func Usage() string {
  56. return strings.TrimSpace(usage)
  57. }