25 #ifndef AOSSL_CONSUL_INCLUDE_FACTORY_CONSUL_H_ 26 #define AOSSL_CONSUL_INCLUDE_FACTORY_CONSUL_H_ 31 #include "consul_interface.h" 33 #include "consul_admin.h" 51 return new ConsulAdmin(caddr);
58 std::string new_name) {
59 return new Service( new_id, new_name );
64 std::string new_name, std::string new_address, std::string new_port) {
65 return new Service( new_id, new_name, new_address, new_port );
70 std::string new_name, std::string new_address, std::string new_port, \
71 std::vector<std::string> new_tags) {
72 return new Service( new_id, new_name, new_address, new_port, new_tags );
76 #endif // AOSSL_CONSUL_INCLUDE_FACTORY_CONSUL_H_ ServiceInterface * get_service_interface(std::string new_id, std::string new_name, std::string new_address, std::string new_port, std::vector< std::string > new_tags)
Get a Service Interface instance.
Definition: factory_consul.h:69
ConsulComponentFactory()
Create a new Service Component Factory.
Definition: factory_consul.h:44
The Consul Administrator, who handles configuration & service discovery.
Definition: consul_interface.h:107
The Consul Service Component Factory.
Definition: factory_consul.h:41
ConsulInterface * get_consul_interface(std::string caddr)
Get a Consul Interface instance.
Definition: factory_consul.h:50
ServiceInterface * get_service_interface(std::string new_id, std::string new_name, std::string new_address, std::string new_port)
Get a Service Interface instance.
Definition: factory_consul.h:63
~ConsulComponentFactory()
Delete a Service Component Factory.
Definition: factory_consul.h:47
A Service class which can be registered with Consul for each app instance.
Definition: consul_interface.h:51
ServiceInterface * get_service_interface(std::string new_id, std::string new_name)
Get a Service Interface instance.
Definition: factory_consul.h:57