help.go 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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.
  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 rest of the cluster.
  52. --discovery ''
  53. discovery URL used to bootstrap the cluster.
  54. --discovery-fallback 'proxy'
  55. expected behavior ('exit' or 'proxy') when discovery services fails.
  56. --discovery-proxy ''
  57. HTTP proxy to use for traffic to discovery service.
  58. --discovery-srv ''
  59. dns srv domain used to bootstrap the cluster.
  60. proxy flags:
  61. --proxy 'off'
  62. proxy mode setting ('off', 'readonly' or 'on').
  63. security flags:
  64. --ca-file '' [DEPRECATED]
  65. path to the client server TLS CA file.
  66. --cert-file ''
  67. path to the client server TLS cert file.
  68. --key-file ''
  69. path to the client server TLS key file.
  70. --client-cert-auth 'false'
  71. enable client cert authentication.
  72. --trusted-ca-file ''
  73. path to the client server TLS trusted CA key file.
  74. --peer-ca-file '' [DEPRECATED]
  75. path to the peer server TLS CA file.
  76. --peer-cert-file ''
  77. path to the peer server TLS cert file.
  78. --peer-key-file ''
  79. path to the peer server TLS key file.
  80. --peer-client-cert-auth 'false'
  81. enable peer client cert authentication.
  82. --peer-trusted-ca-file ''
  83. path to the peer server TLS trusted CA file.
  84. unsafe flags:
  85. Please be CAUTIOUS when using unsafe flags because it will break the guarantees
  86. given by the consensus protocol.
  87. --force-new-cluster 'false'
  88. force to create a new one-member cluster.
  89. `
  90. )