https://github.com/leanovate/play-etcd-client
https://github.com/leanovate/play-etcd-client
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/leanovate/play-etcd-client
- Owner: leanovate
- License: mit
- Created: 2015-10-16T15:09:13.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-02T11:25:10.000Z (about 10 years ago)
- Last Synced: 2024-03-26T15:05:33.937Z (about 2 years ago)
- Language: Scala
- Size: 1.01 MB
- Stars: 0
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# play-etcd-client
Build status: [](https://travis-ci.org/leanovate/play-etcd-client) [](https://codecov.io/github/leanovate/play-etcd-client?branch=master)
[](https://maven-badges.herokuapp.com/maven-central/de.leanovate/play-etcd-client_2.11)
Simple library to use etcd in a play application.
## Usage
The current version is supposed to run with Play 2.4 or higher.
Add the following dependency to your project
```
libraryDependencies += "de.leanovate" %% "play-etcd-client" % "2.4.0"
```
The library has two main classes:
* `de.leanovate.play.etcd.EtcdClient`
* Encapsulates low level interactions with the etcd cluster.
* `getNode`: Get value or directory node
* `createValue`: Create a value node in a directory (with auto-generated key)
* `updateValue`: Create or update a value node
* `deleteValue`: Delete a value node
* `updateDir`: Create or update a directory node
* `deleteDir`: Delete directory node
* `de.leanovate.play.etcd.EtcdOperation`
* Implements higher level usecases one might realize with an etcd cluster.
* `getValues`: Convenient method to get values from value or directory nodes
* `transformValue` / `tryTransformValue`: Perform an atomic transformation on a value node
* `enqueueValue` / `dequeueValue`: Use a directory node as queue
* `lock` / `tryLock`: Perform a cluster-wide synchronization of code block
## License
[MIT Licence](http://opensource.org/licenses/MIT)