Public Member Functions | |
| Node (const std::string &url="http://localhost:4200") | |
| Node (const std::string &url, const std::string &user, const std::string &password) | |
| const std::string & | password () const |
| void | setPassword (const std::string &password) |
| void | setUrl (const std::string &url) |
| void | setUser (const std::string &user) |
| const std::string & | url () const |
| std::string | url (const std::string &path) const |
| const std::string & | user () const |
The class Node encapsulates the information needed to connect to a Crate cluster node. If a user and password is set CURL picks the best suitable authentication automatically (CURLAUTH_ANY).
The setup for a node that is password protected could – for example – look like:
|
explicit |
Constructs a node that connects to the URL url.
| CppCrate::Node::Node | ( | const std::string & | url, |
| const std::string & | user, | ||
| const std::string & | password | ||
| ) |
Constructs a node that connects to the URL url with the credentials user and password.
| const std::string & CppCrate::Node::password | ( | ) | const |
Returns the password used to connect to the node.
| void CppCrate::Node::setPassword | ( | const std::string & | password | ) |
Sets the password used to connect to the node to password.
| void CppCrate::Node::setUrl | ( | const std::string & | url | ) |
Sets the URL used to connect to the node to url.
| void CppCrate::Node::setUser | ( | const std::string & | user | ) |
Sets the user used to connect to the node to user.
| const std::string & CppCrate::Node::url | ( | ) | const |
Returns the node's URL.
| std::string CppCrate::Node::url | ( | const std::string & | path | ) | const |
Returns the node's URL extended by path.
| const std::string & CppCrate::Node::user | ( | ) | const |
Returns the user used to connect to the node.