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