summaryrefslogtreecommitdiff
path: root/lib/input/replStream.h
blob: dcfee19dfae4160304fb658e8d6bdb9f41bd3bbf (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
#ifndef MYGRATE_INPUT_REPLSTREAM_H
#define MYGRATE_INPUT_REPLSTREAM_H

#include "mysqlConn.h"
#include <cstdint>
#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;

	private:
		uint64_t serverid;
		std::string filename;
		uint64_t position;
	};
}

#endif