help.go 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 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. security flags:
  65. --ca-file ''
  66. path to the client server TLS CA file.
  67. --cert-file ''
  68. path to the client server TLS cert file.
  69. --key-file ''
  70. path to the client server TLS key file.
  71. --peer-ca-file ''
  72. path to the peer server TLS CA file.
  73. --peer-cert-file ''
  74. path to the peer server TLS cert file.
  75. --peer-key-file ''
  76. path to the peer server TLS key file.
  77. unsafe flags:
  78. Please be CAUTIOUS when using unsafe flags because it will break the guarantees
  79. given by the consensus protocol.
  80. --force-new-cluster 'false'
  81. force to create a new one-member cluster.
  82. `
  83. )