help.go 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. // Copyright 2015 CoreOS, Inc.
  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. var (
  16. usageline = `usage: etcd [flags]
  17. start an etcd server
  18. etcd --version
  19. show the version of etcd
  20. etcd -h | --help
  21. show the help information about etcd
  22. `
  23. flagsline = `
  24. member flags:
  25. --name 'default'
  26. human-readable name for this member.
  27. --data-dir '${name}.etcd'
  28. path to the data directory.
  29. --snapshot-count '10000'
  30. number of committed transactions to trigger a snapshot to disk.
  31. --heartbeat-interval '100'
  32. time (in milliseconds) of a heartbeat interval.
  33. --election-timeout '1000'
  34. time (in milliseconds) for an election to timeout. See tuning documentation for details.
  35. --listen-peer-urls 'http://localhost:2380,http://localhost:7001'
  36. list of URLs to listen on for peer traffic.
  37. --listen-client-urls 'http://localhost:2379,http://localhost:4001'
  38. list of URLs to listen on for client traffic.
  39. -cors ''
  40. comma-separated whitelist of origins for CORS (cross-origin resource sharing).
  41. clustering flags:
  42. --initial-advertise-peer-urls 'http://localhost:2380,http://localhost:7001'
  43. list of this member's peer URLs to advertise to the rest of the cluster.
  44. --initial-cluster 'default=http://localhost:2380,default=http://localhost:7001'
  45. initial cluster configuration for bootstrapping.
  46. --initial-cluster-state 'new'
  47. initial cluster state ('new' or 'existing').
  48. --initial-cluster-token 'etcd-cluster'
  49. initial cluster token for the etcd cluster during bootstrap.
  50. --advertise-client-urls 'http://localhost:2379,http://localhost:4001'
  51. list of this member's client URLs to advertise to the public.
  52. 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.
  53. --discovery ''
  54. discovery URL used to bootstrap the cluster.
  55. --discovery-fallback 'proxy'
  56. expected behavior ('exit' or 'proxy') when discovery services fails.
  57. --discovery-proxy ''
  58. HTTP proxy to use for traffic to discovery service.
  59. --discovery-srv ''
  60. dns srv domain used to bootstrap the cluster.
  61. proxy flags:
  62. --proxy 'off'
  63. proxy mode setting ('off', 'readonly' or 'on').
  64. --proxy-failure-wait 5000
  65. time (in milliseconds) an endpoint will be held in a failed state.
  66. --proxy-refresh-interval 30000
  67. time (in milliseconds) of the endpoints refresh interval.
  68. --proxy-dial-timeout 1000
  69. time (in milliseconds) for a dial to timeout.
  70. --proxy-write-timeout 5000
  71. time (in milliseconds) for a write to timeout.
  72. --proxy-read-timeout 0
  73. time (in milliseconds) for a read to timeout.
  74. security flags:
  75. --ca-file '' [DEPRECATED]
  76. path to the client server TLS CA file.
  77. --cert-file ''
  78. path to the client server TLS cert file.
  79. --key-file ''
  80. path to the client server TLS key file.
  81. --client-cert-auth 'false'
  82. enable client cert authentication.
  83. --trusted-ca-file ''
  84. path to the client server TLS trusted CA key file.
  85. --peer-ca-file '' [DEPRECATED]
  86. path to the peer server TLS CA file.
  87. --peer-cert-file ''
  88. path to the peer server TLS cert file.
  89. --peer-key-file ''
  90. path to the peer server TLS key file.
  91. --peer-client-cert-auth 'false'
  92. enable peer client cert authentication.
  93. --peer-trusted-ca-file ''
  94. path to the peer server TLS trusted CA file.
  95. logging flags
  96. --debug 'false'
  97. enable debug-level logging for etcd.
  98. --log-package-levels ''
  99. set individual packages to various log levels (eg: 'etcdmain=CRITICAL,etcdserver=DEBUG')
  100. unsafe flags:
  101. Please be CAUTIOUS when using unsafe flags because it will break the guarantees
  102. given by the consensus protocol.
  103. --force-new-cluster 'false'
  104. force to create a new one-member cluster.
  105. `
  106. )