Refactoring in prep for mirroring
This commit is contained in:
parent
f4f8fef82e
commit
37d508ab96
10 changed files with 161 additions and 152 deletions
|
@ -23,16 +23,17 @@
|
|||
* directly against ZeroTier software without disclosing the source code
|
||||
* of your own application.
|
||||
*/
|
||||
|
||||
#ifndef ZT_CONTROLLER_RABBITMQ_HPP
|
||||
#define ZT_CONTROLLER_RABBITMQ_HPP
|
||||
|
||||
namespace ZeroTier
|
||||
{
|
||||
struct MQConfig {
|
||||
const char *host;
|
||||
int port;
|
||||
const char *username;
|
||||
const char *password;
|
||||
const char *host;
|
||||
int port;
|
||||
const char *username;
|
||||
const char *password;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -49,26 +50,25 @@ namespace ZeroTier
|
|||
|
||||
class RabbitMQ {
|
||||
public:
|
||||
RabbitMQ(MQConfig *cfg, const char *queueName);
|
||||
~RabbitMQ();
|
||||
RabbitMQ(MQConfig *cfg, const char *queueName);
|
||||
~RabbitMQ();
|
||||
|
||||
void init();
|
||||
void init();
|
||||
|
||||
std::string consume();
|
||||
std::string consume();
|
||||
|
||||
private:
|
||||
MQConfig *_mqc;
|
||||
const char *_qName;
|
||||
MQConfig *_mqc;
|
||||
const char *_qName;
|
||||
|
||||
amqp_socket_t *_socket;
|
||||
amqp_connection_state_t _conn;
|
||||
amqp_queue_declare_ok_t *_q;
|
||||
int _status;
|
||||
amqp_socket_t *_socket;
|
||||
amqp_connection_state_t _conn;
|
||||
amqp_queue_declare_ok_t *_q;
|
||||
int _status;
|
||||
|
||||
int _channel;
|
||||
int _channel;
|
||||
|
||||
Mutex _chan_m;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue