9af87d50ce
* First pass at etcd3 locker * Add etcd packages to vendor ignore attribute * Properly exclude etcd3locker from earlier versions of golang * Etcd test to only run on go1.9 and go1.10 * Do not export internal etcd3locker methods * context.TODO -> context.Background * Return errors instead of logging * Enforce a 1.5s timeout on acquiring a lease from etcd * Allow etcd3 concurreny.NewSession manage KeepAlive connection - Introduce LockerOptions to allow a custom session TTL (default: 60s); etcd3Locker can be initialized with NewWithLockerOptions if one wants granular control over TTL and prefix used for etcd3 keys - Keep NewWithPrefix backwards compatible by calling NewWithLockerOptions * Add comment on locker_test.go regarding testing the session KeepAlive * Re-export main type * Try to address missing github.com/gogo/protobuf/gogoproto package * Update etcd package import to use go.etcd.io/etcd/clientv3 * Use forked go-etcd-harness for testing * Add more extensive package overview / docs * go fmt * Fix test script * Add downloaded etcd binary to path |
||
---|---|---|
.. | ||
lock.go | ||
locker.go | ||
locker_options.go | ||
locker_test.go |