Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/federicoceratto/nim-etcd-client
etcd client
https://github.com/federicoceratto/nim-etcd-client
etcd library nim nim-lang nimlang
Last synced: 6 days ago
JSON representation
etcd client
- Host: GitHub
- URL: https://github.com/federicoceratto/nim-etcd-client
- Owner: FedericoCeratto
- License: lgpl-3.0
- Created: 2016-10-15T21:30:53.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-04-13T00:00:57.000Z (over 3 years ago)
- Last Synced: 2023-03-22T12:49:31.018Z (over 1 year ago)
- Topics: etcd, library, nim, nim-lang, nimlang
- Language: Nim
- Size: 8.79 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
== etcd_client
Nim client for https://coreos.com/etcd/docs/latest/[etcd] - API v2
=== Installation
[source,bash]
----
nimble install etcd_client
----=== Usage
Refer to the etcd documentation on how to use the datastore.
Run "nim doc2" to generate docs for the library.
Usage example:
[source,nim]
----
import etcd_clientlet c = new_etcd_client(failover=false)
# get_version
let v = c.get_version()# get_health
let v = c.get_health()# get_debug_vars
let v = c.get_debug_vars()# list directory
echo c.ls("/")# create, get, update, delete key
c.create("test_key", "Hello world")
echo c.get("test_key")
c.update("test_key", "Hello 2")
c.del("test_key")# Get stats
echo c.get_leader_stats()
echo c.get_self_stats()
echo c.get_store_stats()# cluster members
echo c.get_cluster_members()# mkdir, rmdir
c.mkdir("test_dir")
c.rmdir("test_dir")
----More working examples are available under tests/functional.nim