Andrea Luzzardi
895484ec2a
store: WatchRange -> WatchTree
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 21:58:02 -07:00
Andrea Luzzardi
1d3aa013db
store: DeleteRange -> DeleteTree
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 21:58:02 -07:00
Andrea Luzzardi
6f41eabdae
store: GetRange -> List
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 21:58:02 -07:00
Andrea Luzzardi
1638907485
store: Fix etcd atomic operations.
...
- The TTL was set to 5 by error (I guess)
- There is no need to check the response, the operation fails.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 21:58:02 -07:00
Andrea Luzzardi
bd18f27bda
store: Refactor Atomic operations to use KVEntry.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 21:58:02 -07:00
Andrea Luzzardi
93ad39c079
store: Use KVEntry in Get() for consistency with GetRange()
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 21:58:02 -07:00
Andrea Luzzardi
d4bdb10d35
store: Make KVEntry a struct rather than an interface.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 21:58:02 -07:00
Andrea Luzzardi
747a83a40a
store: Cleanup initializers.
...
- KV is now Backend
- name (string) is now backend (Backend)
- initializers are now a static var rather than generated by init()
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 21:32:10 -07:00
Andrea Luzzardi
23481131c4
store: Add a channel to lock that is closed if our lock is lost or an error.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 17:35:57 -07:00
Andrea Luzzardi
250a17e954
Merge pull request #780 from abronan/improve_helpers
...
Refactor helpers for storage key formatting
2015-05-14 17:02:58 -07:00
Andrea Luzzardi
04f7d2ac10
pkg/store: Remove unsused ErrSessionUndefined from consul.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-13 19:01:01 -07:00
Andrea Luzzardi
9d055d6bf8
pkg/store: Pass Options as pointer, not value.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-13 19:00:39 -07:00
Alexandre Beslic
a73c89d42b
remove bool argument from getDirectory
...
Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-05-13 18:05:47 -07:00
Alexandre Beslic
ccf6e37c16
Refactor helpers to be more meaningful and flexible for future store usage
...
Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-05-13 18:02:48 -07:00
Andrea Luzzardi
e6d4a5733c
Merge pull request #782 from abronan/fix_init_etcd
...
Call SyncCluster at etcd client initialization
2015-05-13 17:17:41 -07:00
Alexandre Beslic
959bd0adbb
Add call to SyncCluster at etcd client initialization
...
Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-05-13 17:10:52 -07:00
Andrea Luzzardi
f4bd5834fa
store: Improved Lock support.
...
- New interface: `store.CreateLock` returns a `Locker` interface with
`Lock` and `Unlock` functions.
- Consul: New locking implementation leveraging helper lock
implementation that comes with the go library.
- ZK: Lock support using the library helpers.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-13 16:15:19 -07:00
Victor Vieux
0b45fa5154
user varargs in store the watch callback
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-13 15:42:44 -07:00
Madhu Venugopal
0130c2262d
GetRange and WatchRange to return {key,value,index} tuple
...
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-13 11:24:03 -07:00
Alexandre Beslic
2fc3f8e663
update README
...
Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-05-12 15:06:57 -07:00
Alexandre Beslic
6f67ca3a58
replace variadic method options for simple Config struct, correct Consul Watch method
...
Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-05-12 14:00:55 -07:00
Alexandre Beslic
8909dfda63
Fix zookeeper watch methods with key being formatted twice before given to GetRange
...
Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-05-11 19:07:21 -07:00
Alexandre Beslic
d333da5284
remove log info for default case in SetOptions
...
Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-05-11 17:49:40 -07:00
Alexandre Beslic
59e1e9b942
Change existing discovery backends to 'kv' using metatada storage backends in the store package
...
Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-05-11 17:23:55 -07:00