Skip to content

Latest commit

 

History

History
23 lines (13 loc) · 598 Bytes

README.md

File metadata and controls

23 lines (13 loc) · 598 Bytes

ETCD C API

the library provide basic etcd C API

  • etcd_open_str(server-list [as a string]);

  • etcd_close_str

  • etcd_get(key) returns an etcd_node structure

  • free_etcd_node(etcd_node *node)

  • etcd_watch (prefix, [optional] index) return an etcd_node structure

  • etcd_set(key, value, flag, [optional] prev-condition, [optional] ttl) prev-condition can be value/isExist/index flag can be EGO_VALUE/EGO_DIR/EGO_ORDER

  • etcd_set_dir(key, [optional] ttl);

  • etcd_delete(key);

  • etcd_self() return an etcd_self structure containing leader and self status