29 #include "aossl/core/include/buffers.h" 30 #include "aossl/core/include/kv_store_interface.h" 32 #ifndef AOSSL_CONSUL_INCLUDE_CONSUL_INTERFACE_H_ 33 #define AOSSL_CONSUL_INCLUDE_CONSUL_INTERFACE_H_ 64 virtual std::string to_json()
const = 0;
67 virtual std::string get_id()
const = 0;
70 virtual std::string get_name()
const = 0;
73 virtual std::string get_address()
const = 0;
76 virtual std::string get_port()
const = 0;
79 virtual void set_id(std::string new_id) = 0;
82 virtual void set_name(std::string new_name) = 0;
85 virtual void set_address(std::string new_address) = 0;
88 virtual void set_port(std::string new_port) = 0;
91 virtual std::vector<std::string> get_tags() = 0;
93 virtual void add_tag(std::string new_tag) = 0;
95 virtual void clear_tags() = 0;
97 virtual int num_tags()
const = 0;
102 virtual void set_check(std::string scr,
int interval_seconds) = 0;
104 virtual void set_check(std::string scr,
int interv_seconds,
int interv_ttl) = 0;
126 virtual void base64_decode_by_reference(std::string
const& encoded_string, \
137 base64_decode_safe(std::string
const& encoded_string) = 0;
165 virtual bool set_config_value(std::string key, std::string val) = 0;
168 virtual bool del_config_value(std::string key) = 0;
213 services_node(std::string node, std::string data_center) = 0;
216 virtual void add_acl_token(std::string& token) = 0;
221 #endif // AOSSL_CONSUL_INCLUDE_CONSUL_INTERFACE_H_ std::string ttl
The TTL for the health check.
Definition: consul_interface.h:48
A Structure for holding a single value.
Definition: buffers.h:42
std::string interval
The interval for the health check.
Definition: consul_interface.h:45
A struct to hold health check information which can be added to a service.
Definition: consul_interface.h:40
std::string url
The HTTP URL to hit with a GET request for the healthcheck.
Definition: consul_interface.h:42
The Consul Administrator, who handles configuration & service discovery.
Definition: consul_interface.h:115
A Service class which can be registered with Consul for each app instance.
Definition: consul_interface.h:57
Key Value Store.
Definition: kv_store_interface.h:38