项目作者: linux-china

项目描述 :
Kotlin DSL for Apache Curator to make ZooKeeper operation easy
高级语言: Kotlin
项目地址: git://github.com/linux-china/kotlin-curator-dsl.git
创建时间: 2017-07-30T01:48:12Z
项目社区:https://github.com/linux-china/kotlin-curator-dsl

开源协议:

下载


Kotlin Curator DSL

Kotlin DSL for Apache Curator to make ZooKeeper operation easy.

Why DSL

The CuratorFramework uses a Fluent-style interface, and it’s good. But DSL will make it easy to read and write.

Curator Recipes

  • Operations for path data, such as setData, getData, create etc
  • Elections
  • Leaders
  • Barriers
  • Counters
  • Caches
  • Nodes
  • Queues

Curator DSL

  1. curator(curatorFramework) {
  2. getStringData("/xxx") {
  3. println(it)
  4. }
  5. lock("/xxx") {
  6. }
  7. }

TODO

  • CuratorFramework class extension
  • Curator Async
  • Documentation

References