blob: 495845994992a9e49a377c0f6deaa9775698d1c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#ifndef MYGRATE_INPUT_REPLSTREAM_H
#define MYGRATE_INPUT_REPLSTREAM_H
#include "mysqlConn.h"
#include <cstdint>
#include <eventCounter.h>
#include <eventSourceBase.h>
#include <string>
namespace MyGrate {
class EventHandlerBase;
}
namespace MyGrate::Input {
class ReplicationStream : public EventSourceBase, public MySQLConn {
public:
ReplicationStream(const std::string & host, const std::string & user, const std::string & pass,
unsigned short port, uint64_t serverid, std::string filename, uint64_t position);
void readEvents(EventHandlerBase &) override;
void stopEvents() override;
const EventCounter & getReceivedCounts() const;
const EventCounter & getHandledCounts() const;
private:
uint64_t serverid;
std::string filename;
uint64_t position;
EventCounter received, handled;
};
}
#endif
|