usage.go 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. -peers=<peers> Comma-separated list of peers (ip + port) in the cluster.
  25. -peers-file=<path> Path to a file containing the peer list.
  26. Client Communication Options:
  27. -addr=<host:port> The public host:port used for client communication.
  28. -bind-addr=<host> The listening hostname used for client communication.
  29. -ca-file=<path> Path to the client CA file.
  30. -cert-file=<path> Path to the client cert file.
  31. -key-file=<path> Path to the client key file.
  32. Peer Communication Options:
  33. -peer-addr=<host:port> The public host:port used for peer communication.
  34. -peer-bind-addr=<host> The listening hostname used for peer communication.
  35. -peer-ca-file=<path> Path to the peer CA file.
  36. -peer-cert-file=<path> Path to the peer cert file.
  37. -peer-key-file=<path> Path to the peer key file.
  38. Other Options:
  39. -max-result-buffer Max size of the result buffer.
  40. -max-retry-attempts Number of times a node will try to join a cluster.
  41. -max-cluster-size Maximum number of nodes in the cluster.
  42. -snapshot Open or close the snapshot.
  43. -snapshot-count Number of transactions before issuing a snapshot.
  44. `
  45. // Usage returns the usage message for etcd.
  46. func Usage() string {
  47. return strings.TrimSpace(usage)
  48. }