Skip to content

pambrose/etcd-recipes

Repository files navigation

etcd Recipes

JitPack Build Status Codacy Badge codebeat badge codecov Coverage Status Quality Gate Status Known Vulnerabilities Kotlin Java

etcd-recipes is a Kotlin/Java/JVM client library for etcd v3, a distributed, reliable key-value store. It attempts to provide the same kind of support for etcd that Curator does for ZooKeeper.

Examples

The repo includes Java and Kotlin examples.

Usage

connectToEtcd(urls) { client ->
    client.putValue("test_key", "test_value")
    sleep(5.seconds)
    client.delete("test_key")
}

Compatability

etcd-recipes is built on top of jetcd, which works with etcd v3.

etcd-recipies is written in Kotlin, but is usable by Java and any other JVM clients.

Download

Jars are available at jitpack.io.

Gradle

# Add kotlinx and jitpack.io to repositories
repositories {
    mavenCentral()
    maven { url "https://kotlin.bintray.com/kotlinx" }
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation "com.github.pambrose.etcd-recipes:etcd-recipes:0.9.21"
}

Maven

<repositories>
    <repository>
        <id>kotlinx</id>
        <name>kotlinkx Releases</name>
        <url>https://kotlin.bintray.com/kotlinx</url>
    </repository>
    <repository>
        <id>jitpack.io</id>
        <name>jitpack.io Releases</name>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
      <groupId>com.github.pambrose.etcd-recipes</groupId>
      <artifactId>etcd-recipes</artifactId>
      <version>0.9.21</version>
    </dependency>
</dependencies>