Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

marshall-lee/etcd.erl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Oct 29, 2013
bfbe7e4 · Oct 29, 2013

History

13 Commits
Oct 28, 2013
Oct 29, 2013
Oct 29, 2013
Oct 28, 2013
Oct 28, 2013
Oct 28, 2013
Oct 28, 2013
Oct 28, 2013

Repository files navigation

etcd.erl

Erlang bindings for etcd key value store.

Usage

start

etcd:start()

set

{ok, Response} = etcd:set("http://localhost:4001", "/message", "Hello world", 400).

"/message" is the key and "Hello world" is the value. 400 is the timeout.

get

{ok, Response} = etcd:get("http://localhost:4001", "/message", infinity).

test and set

etcd:set("http://localhost:4001", "/message", "one", infinity),
{ok, Response} = etcd:test_and_set("http://localhost:4001", "/message", "one", "two", infinity).

Directories are also supported:

{ok, Response1} = etcd:set("http://localhost:4001", "/foo/message1", "Hello day", infinity),
{ok, Response2} = etcd:set("http://localhost:4001", "/foo/message2", "Hello night", infinity),
{ok, ResponseList} = etcd:get("http://localhost:4001", "/foo", infinity).

delete

etcd:set("http://localhost:4001", "/message", "Hello world", infinity),
etcd:delete("http://localhost:4001", "/message", infinity).

watch

Result = etcd:watch("http://localhost:4001", "/foo", infinity),

Watch for commands at index 42:

Result = etcd:watch("http://localhost:4001", "/foo", 42, infinity),

About

Erlang bindings for etcd key value store

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages