doc.go 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. Copyright 2014 CoreOS, Inc.
  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. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. /*
  14. ## Add Member
  15. ### Request
  16. `curl http://${remote_client_url}/v2/admin/members/{$id} -XPUT -d 'PeerURLs=${peer_url_1}&PeerURLs=${peer_url_2}'`
  17. Parameter `remote_client_url` is serving client url of the cluster.
  18. Parameter `id` is the identification of new member in hexadecimal.
  19. Parameter `peer_url_` is peer urls of the new member.
  20. ### Response
  21. Categorized by HTTP status code.
  22. #### HTTP 201
  23. The member is created successfully.
  24. #### HTTP 400
  25. etcd cannot parse out the request.
  26. #### HTTP 500
  27. etcd fails to create the new member.
  28. ## Remove Member
  29. ### Request
  30. `curl http://${remote_client_url}/v2/admin/members/{$id} -XDELETE`
  31. Parameter `remote_client_url` is serving client url of the cluster.
  32. Parameter `id` is the identification of member to be removed in hexadecimal.
  33. ### Response
  34. #### HTTP 204
  35. The member is removed successfully.
  36. #### HTTP 400
  37. etcd cannot parse out the request.
  38. #### HTTP 500
  39. etcd fails to remove the member.
  40. */
  41. package etcdhttp