doc.go 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // Copyright 2014 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. /*
  15. ## Add Member
  16. ### Request
  17. `curl http://${remote_client_url}/v2/admin/members/{$id} -XPUT -d 'PeerURLs=${peer_url_1}&PeerURLs=${peer_url_2}'`
  18. Parameter `remote_client_url` is serving client url of the cluster.
  19. Parameter `id` is the identification of new member in hexadecimal.
  20. Parameter `peer_url_` is peer urls of the new member.
  21. ### Response
  22. Categorized by HTTP status code.
  23. #### HTTP 201
  24. The member is created successfully.
  25. #### HTTP 400
  26. etcd cannot parse out the request.
  27. #### HTTP 500
  28. etcd fails to create the new member.
  29. ## Remove Member
  30. ### Request
  31. `curl http://${remote_client_url}/v2/admin/members/{$id} -XDELETE`
  32. Parameter `remote_client_url` is serving client url of the cluster.
  33. Parameter `id` is the identification of member to be removed in hexadecimal.
  34. ### Response
  35. #### HTTP 204
  36. The member is removed successfully.
  37. #### HTTP 400
  38. etcd cannot parse out the request.
  39. #### HTTP 500
  40. etcd fails to remove the member.
  41. */
  42. package etcdhttp