Version 4 of etcd

Updated 2015-01-21 23:17:26 by EF

etcd is a highly-available key value store for shared configuration and service discovery written in the Go language. Together with fleet, it forms the core of the cloud-specific linux distribution called CoreOS . A Tcl implementation of the API is available as part of the biot project.

EF 2015-01-21 An earlier version of this API used ::etcd::set and ::etcd::get to set and get keys, which interfered with the regular set. The new version uses a different naming convention, in line with the python API implementation . The new version also uses more complex semantics for ::etcd::read, ::etcd::write and ::etcd::delete, procedures that are used by most of the remaining procedures.

# Create a new connection context (defaults to default port on localhost)
set c [::etcd::new]

# Create a directory, and a sub-directory
::etcd::mkdir $c /onedir
::etcd::mkdir $c /onedir/asubdir

# Create and set a key:
::etcd::write $c /onedir/asubdir/test "Hello World"

# Get back the key
set k [::etcd::read $c /onedir/asubdir/test]

# Remove the key
::etcd::delete $c /onedir/asubdir/test

# Remove the directories, recursively
::etcd::rmdir $c /onedir 1

Being completely self-contained, the library will probably move to a new separate location in order to be able to appear in the official list of language bindings and tools