summaryrefslogtreecommitdiff
path: root/lib/input
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-06-29 00:51:57 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-06-29 00:51:57 +0100
commitc6c1ca92ea2d65278271fcf139c33e7f24f916f4 (patch)
tree931cae5dcf5267e71b16e5ab4bebc8bec6b5ab33 /lib/input
parentMARIADB_RPL_FILENAME requires the filename length, not just the string data (diff)
downloadmygrate-c6c1ca92ea2d65278271fcf139c33e7f24f916f4.tar.bz2
mygrate-c6c1ca92ea2d65278271fcf139c33e7f24f916f4.tar.xz
mygrate-c6c1ca92ea2d65278271fcf139c33e7f24f916f4.zip
Support stopping the event stream reading
Diffstat (limited to 'lib/input')
-rw-r--r--lib/input/replStream.cpp6
-rw-r--r--lib/input/replStream.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/input/replStream.cpp b/lib/input/replStream.cpp
index c5bc61f..eb6c030 100644
--- a/lib/input/replStream.cpp
+++ b/lib/input/replStream.cpp
@@ -39,4 +39,10 @@ namespace MyGrate::Input {
}
}
}
+
+ void
+ ReplicationStream::stopEvents()
+ {
+ mariadb_cancel(this);
+ }
}
diff --git a/lib/input/replStream.h b/lib/input/replStream.h
index dcfee19..40ec390 100644
--- a/lib/input/replStream.h
+++ b/lib/input/replStream.h
@@ -17,6 +17,7 @@ namespace MyGrate::Input {
unsigned short port, uint64_t serverid, std::string filename, uint64_t position);
void readEvents(EventHandlerBase &) override;
+ void stopEvents() override;
private:
uint64_t serverid;