etcdhttp

package
v0.4.7-0...-09e9618 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2014 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

## Add Member

### Request

`curl http://${remote_client_url}/v2/admin/members/{$id} -XPUT -d 'PeerURLs=${peer_url_1}&PeerURLs=${peer_url_2}'`

Parameter `remote_client_url` is serving client url of the cluster. Parameter `id` is the identification of new member in hexadecimal. Parameter `peer_url_` is peer urls of the new member.

### Response

Categorized by HTTP status code.

#### HTTP 201

The member is created successfully.

#### HTTP 400

etcd cannot parse out the request.

#### HTTP 500

etcd fails to create the new member.

## Remove Member

### Request

`curl http://${remote_client_url}/v2/admin/members/{$id} -XDELETE`

Parameter `remote_client_url` is serving client url of the cluster. Parameter `id` is the identification of member to be removed in hexadecimal.

### Response

#### HTTP 204

The member is removed successfully.

#### HTTP 400

etcd cannot parse out the request.

#### HTTP 500

etcd fails to remove the member.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientHandler

func NewClientHandler(server *etcdserver.EtcdServer) http.Handler

NewClientHandler generates a muxed http.Handler with the given parameters to serve etcd client requests.

func NewPeerHandler

func NewPeerHandler(server *etcdserver.EtcdServer) http.Handler

NewPeerHandler generates an http.Handler to handle etcd peer (raft) requests.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL