108 Commits

Author SHA1 Message Date
Jonathan Boulle
0a8721a708 etcdserver: expose store statistics 2014-10-16 10:43:23 -07:00
Yicheng Qin
a8a1d4fd93 Merge pull request #1299 from unihorn/162
etcdhttp: add PUT and DELETE on /v2/admin/members/
2014-10-15 10:52:11 -07:00
Yicheng Qin
6d0658c8ca etcdhttp: check error returned by ParseForm 2014-10-14 14:50:11 -07:00
Jonathan Boulle
7656069675 etcdhttp: remove members handling for now 2014-10-14 12:07:28 -07:00
Jonathan Boulle
4183b69e12 *: move from third_party to Godep 2014-10-14 00:37:52 -07:00
Yicheng Qin
31264e7eb5 etcdhttp: add PUT and DELETE on /v2/admin/members/ 2014-10-13 22:36:06 -07:00
Xiang Li
1177b07535 etcdserver: change machines endpoint to members 2014-10-14 11:02:17 +08:00
Yicheng Qin
77271b0663 etcdserver: split Member into RaftAttributes and Attributes
The split helps to save them in different key paths, because they have
distinct life cycle on update.
2014-10-09 20:28:00 -07:00
Xiang Li
8bbbaa88b2 *: raft related int64 -> uint64 2014-10-09 14:29:21 +08:00
Yicheng Qin
8e8719f6ac etcdserver: Create, Delete -> Add, Remove 2014-10-07 16:21:58 -07:00
Yicheng Qin
d051af4d3d etcdserver: apply config change on cluster store 2014-10-07 11:04:50 -07:00
Jonathan Boulle
f432b9d29b etcdhttp: remove configurable timeout
It's slightly unclear why we expose this timeout as being configurable,
and the `-timeout` flag does not exist in 0.4.x, so for now, remove the
flag until we have evidence that it is needed.
2014-10-03 13:47:34 -07:00
Jonathan Boulle
af6b29f291 main: move server configuration to etcdserver package 2014-10-03 13:34:49 -07:00
Jonathan Boulle
1c11f6a144 *: expose etcd-index in watch requests
This adds a StartIndex field to the Watcher interface, which represents
the Etcd-Index at which the Watcher is created.

Also refactors the HTTP tests to use a table for most handleWatch tests
2014-10-02 18:10:11 -07:00
Brandon Philips
c2f96631d3 etcdserver: stop using addScheme
This standardizes the flags to use a list of URLs everywhere. The next
step is to enforce the scheme based on TLS settings and support compat
flags.
2014-09-30 16:40:32 -07:00
Yicheng Qin
0e8345aa73 Merge pull request #1143 from unihorn/136
*: Id -> ID for protobuf types
2014-09-29 13:58:02 -07:00
Yicheng Qin
e83f851995 etcdserver: move cluster test from etcdhttp to etcdserver 2014-09-28 14:35:48 -07:00
Yicheng Qin
15798a73d9 etcdserver: return client urls for /v2/machines 2014-09-26 16:50:15 -07:00
Yicheng Qin
1d5d2e3726 *: Id -> ID for protobuf types
We use ID instead of Id in this project based on golang conventions.
2014-09-26 11:49:30 -07:00
Brandon Philips
5e3fd6ee3f etcdserver: introduce the cluster and member
This introduces two new concepts: the cluster and the member.

Members are logical etcd instances that have a name, raft ID, and a list
of peer and client addresses.

A cluster is made up of a list of members.
2014-09-25 18:04:10 -07:00
Jonathan Boulle
9b3478218e etcdserver: add RaftIndex and RaftTerm 2014-09-25 16:46:24 -07:00
Jonathan Boulle
2da1010cf7 etcdhttp: make TTL= equivalent to unset, and TTL=0 expire 2014-09-24 17:41:44 -07:00
Jonathan Boulle
fa762e6b25 etcdhttp: process dir parameter in request 2014-09-24 17:11:28 -07:00
Jonathan Boulle
2b52384e7e etcdhttp: allow empty values for TTL parameter 2014-09-24 16:44:55 -07:00
Jonathan Boulle
2e2cd12407 etcdhttp: disallow empty prevValue fields 2014-09-24 15:21:18 -07:00
Jonathan Boulle
a9caa24f8a etcdhttp: add test for streaming watches 2014-09-24 11:27:36 -07:00
Jonathan Boulle
ddc30c0a33 etcdserver: use Context to communicate timeout, and add tests 2014-09-24 11:27:36 -07:00
Jonathan Boulle
172a32e5e3 etcdserver: correct timeout and streaming handling
This reintroduces the 'stream' parameter to support long-lived watch
sessions. These sessions respect a server timeout (set to 5 minutes by
default).
2014-09-24 11:27:36 -07:00
Brian Waldon
91003cb994 *: s/prevExists/prevExist/ 2014-09-18 21:25:08 -07:00
Jonathan Boulle
67e57ffca4 etcdserver: split out client and server listeners 2014-09-16 11:36:37 -07:00
Jonathan Boulle
a7ec09c877 etcdserver/etcdhttp: use empty node for test 2014-09-15 20:34:14 -07:00
Jonathan Boulle
f846c5286a etcdserver/etcdhttp: fix comment, simplify resServer 2014-09-15 19:01:40 -07:00
Jonathan Boulle
27cf7747ea etcdserver/etcdhttp: add tests for serveKeys 2014-09-15 18:33:10 -07:00
Jonathan Boulle
7ac3b32de6 etcdserver: change raft endpoint to send StatusNoContent 2014-09-15 16:10:31 -07:00
Jonathan Boulle
3e2c160eed etcdserver/etcdhttp: add test coverage for serveRaft 2014-09-15 16:07:06 -07:00
Jonathan Boulle
e04c028d64 etcdserver/etcdhttp: switch to using http.ServeMux 2014-09-15 16:05:20 -07:00
Jonathan Boulle
d9cfc35bed etcdhttp: check method for every endpoint, add tests 2014-09-15 14:56:43 -07:00
Jonathan Boulle
c03798f99b Merge pull request #1011 from jonboulle/clean_http
Validate HTTP API user input
2014-09-11 15:31:25 -07:00
Jonathan Boulle
52ddd389ff etcdhttp: use Form values over query parameters 2014-09-11 15:12:31 -07:00
Jonathan Boulle
7c03704b19 etcdserver: restructure to hopefully simplify
Obviate parseBool helper, define emptyReq locally to parseRequest,
have writeEvent return an error which gets logged
2014-09-11 08:50:41 -07:00
Brian Waldon
bafe960dba etcdhttp: add Peers.Endpoints 2014-09-10 18:02:02 -07:00
Jonathan Boulle
e2d01eff35 etcdserver: switch to using etcd.Error 2014-09-10 15:46:13 -07:00
Jonathan Boulle
2342402434 etcdserver: address style comments 2014-09-10 14:14:14 -07:00
Jonathan Boulle
bed63cddf7 etcdhttp: add tests for ParseBool/ParseUint64 helpers 2014-09-10 12:05:36 -07:00
Jonathan Boulle
e736a11ac4 etcdhttp: perform validation of query parameters
Add basic input validation of all query parameters supported by
serveKeys. Also restructures etcdhttp a bit to better facilitate
testing.

Test coverage is slightly improved.
2014-09-10 12:01:58 -07:00
Yicheng Qin
51e4bbfeb0 http: check err return from http.NewRequest 2014-09-09 20:46:56 -07:00
Yicheng Qin
961a61d708 http: add allow func
For further extendability
2014-09-09 15:45:34 -07:00
Yicheng Qin
4087fa5c7a http: allow GET, HEAD for /v2/machines 2014-09-09 15:22:52 -07:00
Yicheng Qin
0c1d1b7aeb etcdhttp: add /v2/machines endpoint 2014-09-09 15:00:29 -07:00
Jonathan Boulle
44acd57ea4 etcdserver: remove superfluous context 2014-09-09 11:18:25 -07:00