help.go 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. // Copyright 2015 The etcd Authors
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package etcdmain
  15. import "strconv"
  16. var (
  17. usageline = `usage: etcd [flags]
  18. start an etcd server
  19. etcd --version
  20. show the version of etcd
  21. etcd -h | --help
  22. show the help information about etcd
  23. etcd --config-file
  24. path to the server configuration file
  25. `
  26. flagsline = `
  27. member flags:
  28. --name 'default'
  29. human-readable name for this member.
  30. --data-dir '${name}.etcd'
  31. path to the data directory.
  32. --wal-dir ''
  33. path to the dedicated wal directory.
  34. --snapshot-count '10000'
  35. number of committed transactions to trigger a snapshot to disk.
  36. --heartbeat-interval '100'
  37. time (in milliseconds) of a heartbeat interval.
  38. --election-timeout '1000'
  39. time (in milliseconds) for an election to timeout. See tuning documentation for details.
  40. --listen-peer-urls 'http://localhost:2380'
  41. list of URLs to listen on for peer traffic.
  42. --listen-client-urls 'http://localhost:2379'
  43. list of URLs to listen on for client traffic.
  44. --max-snapshots '` + strconv.Itoa(defaultMaxSnapshots) + `'
  45. maximum number of snapshot files to retain (0 is unlimited).
  46. --max-wals '` + strconv.Itoa(defaultMaxWALs) + `'
  47. maximum number of wal files to retain (0 is unlimited).
  48. --cors ''
  49. comma-separated whitelist of origins for CORS (cross-origin resource sharing).
  50. --quota-backend-bytes '0'
  51. raise alarms when backend size exceeds the given quota (0 defaults to low space quota).
  52. clustering flags:
  53. --initial-advertise-peer-urls 'http://localhost:2380'
  54. list of this member's peer URLs to advertise to the rest of the cluster.
  55. --initial-cluster 'default=http://localhost:2380'
  56. initial cluster configuration for bootstrapping.
  57. --initial-cluster-state 'new'
  58. initial cluster state ('new' or 'existing').
  59. --initial-cluster-token 'etcd-cluster'
  60. initial cluster token for the etcd cluster during bootstrap.
  61. Specifying this can protect you from unintended cross-cluster interaction when running multiple clusters.
  62. --advertise-client-urls 'http://localhost:2379'
  63. list of this member's client URLs to advertise to the public.
  64. The client URLs advertised should be accessible to machines that talk to etcd cluster. etcd client libraries parse these URLs to connect to the cluster.
  65. --discovery ''
  66. discovery URL used to bootstrap the cluster.
  67. --discovery-fallback 'proxy'
  68. expected behavior ('exit' or 'proxy') when discovery services fails.
  69. "proxy" supports v2 API only.
  70. --discovery-proxy ''
  71. HTTP proxy to use for traffic to discovery service.
  72. --discovery-srv ''
  73. dns srv domain used to bootstrap the cluster.
  74. --strict-reconfig-check
  75. reject reconfiguration requests that would cause quorum loss.
  76. --auto-compaction-retention '0'
  77. auto compaction retention in hour. 0 means disable auto compaction.
  78. proxy flags:
  79. "proxy" supports v2 API only.
  80. --proxy 'off'
  81. proxy mode setting ('off', 'readonly' or 'on').
  82. --proxy-failure-wait 5000
  83. time (in milliseconds) an endpoint will be held in a failed state.
  84. --proxy-refresh-interval 30000
  85. time (in milliseconds) of the endpoints refresh interval.
  86. --proxy-dial-timeout 1000
  87. time (in milliseconds) for a dial to timeout.
  88. --proxy-write-timeout 5000
  89. time (in milliseconds) for a write to timeout.
  90. --proxy-read-timeout 0
  91. time (in milliseconds) for a read to timeout.
  92. security flags:
  93. --ca-file '' [DEPRECATED]
  94. path to the client server TLS CA file. '-ca-file ca.crt' could be replaced by '-trusted-ca-file ca.crt -client-cert-auth' and etcd will perform the same.
  95. --cert-file ''
  96. path to the client server TLS cert file.
  97. --key-file ''
  98. path to the client server TLS key file.
  99. --client-cert-auth 'false'
  100. enable client cert authentication.
  101. --trusted-ca-file ''
  102. path to the client server TLS trusted CA key file.
  103. --auto-tls 'false'
  104. client TLS using generated certificates.
  105. --peer-ca-file '' [DEPRECATED]
  106. path to the peer server TLS CA file. '-peer-ca-file ca.crt' could be replaced by '-peer-trusted-ca-file ca.crt -peer-client-cert-auth' and etcd will perform the same.
  107. --peer-cert-file ''
  108. path to the peer server TLS cert file.
  109. --peer-key-file ''
  110. path to the peer server TLS key file.
  111. --peer-client-cert-auth 'false'
  112. enable peer client cert authentication.
  113. --peer-trusted-ca-file ''
  114. path to the peer server TLS trusted CA file.
  115. --peer-auto-tls 'false'
  116. peer TLS using self-generated certificates if --peer-key-file and --peer-cert-file are not provided.
  117. logging flags
  118. --debug 'false'
  119. enable debug-level logging for etcd.
  120. --log-package-levels ''
  121. specify a particular log level for each etcd package (eg: 'etcdmain=CRITICAL,etcdserver=DEBUG').
  122. unsafe flags:
  123. Please be CAUTIOUS when using unsafe flags because it will break the guarantees
  124. given by the consensus protocol.
  125. --force-new-cluster 'false'
  126. force to create a new one-member cluster.
  127. profiling flags:
  128. --enable-pprof 'false'
  129. Enable runtime profiling data via HTTP server. Address is at client URL + "/debug/pprof"
  130. `
  131. )