3 #include <zk/config.hpp>
9 #include "forwards.hpp"
36 explicit client(string_view conn_string);
39 explicit client(std::shared_ptr<connection> conn) noexcept;
47 static future<client>
connect(string_view conn_string);
63 future<get_result>
get(string_view path)
const;
72 future<watch_result>
watch(string_view path)
const;
81 future<get_children_result>
get_children(string_view path)
const;
87 future<watch_children_result>
watch_children(string_view path)
const;
90 future<exists_result>
exists(string_view path)
const;
96 future<watch_exists_result>
watch_exists(string_view path)
const;
120 future<create_result>
create(string_view path,
125 future<create_result>
create(string_view path,
146 future<get_acl_result>
get_acl(string_view path)
const;
221 std::shared_ptr<connection> _conn;
Describes the various result types of client operations.
Controls the import of the optional and nullopt_t types, as well as the nullopt constexpr.
future< multi_result > commit(multi_op txn)
Commit the transaction specified by txn.
future< void > erase(string_view path, version check=version::any())
Erase the node with the given path.
Represents a version of the ACL of a ZNode.
future< watch_result > watch(string_view path) const
Similar to get, but if the call is successful (no error is returned), a watch will be left on the nod...
future< exists_result > exists(string_view path) const
Return the stat of the node of the given path or nullopt if no such node exists.
future< create_result > create(string_view path, const buffer &data, const acl &rules, create_mode mode=create_mode::normal)
Create a node with the given path.
create_mode
When used in client::set, this value determines how the znode is created on the server.
Standard behavior of a znode – the opposite of doing any of the options.
static future< client > connect(string_view conn_string)
Create a client connected to the cluster specified by conn_string.
future< void > load_fence() const
Ensure that all subsequent reads observe the data at the transaction on the server at or past real-ti...
Controls the import of future and promise types.
Controls the import of the string_view type.
future< get_acl_result > get_acl(string_view path) const
Return the ACL and stat of the node of the given path.
future< watch_children_result > watch_children(string_view path) const
Similar to get_children, but if the call is successful (no error is returned), a watch will be left o...
An access control list is a wrapper around acl_rule instances.
Controls the buffer type.
future< watch_exists_result > watch_exists(string_view path) const
Similar to watch, but if the call is successful (no error is returned), a watch will be left on the n...
future< void > set_acl(string_view path, const acl &rules, acl_version check=acl_version::any())
Set the ACL for the node of the given path if such a node exists and the given version check matches ...
future< set_result > set(string_view path, const buffer &data, version check=version::any())
Set the data for the node of the given path if such a node exists and the given version matches the v...
static constexpr version any()
When specified in an operation, this version specifier will always pass.
future< get_children_result > get_children(string_view path) const
Return the list of the children of the node of the given path.
Represents a version of the data.
ZKPP_BUFFER_TYPE buffer
The buffer type.
A ZooKeeper client connection.