diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/eventSourceBase.h | 1 | ||||
-rw-r--r-- | lib/input/replStream.cpp | 6 | ||||
-rw-r--r-- | lib/input/replStream.h | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/lib/eventSourceBase.h b/lib/eventSourceBase.h index 6d512b2..db6bd1b 100644 --- a/lib/eventSourceBase.h +++ b/lib/eventSourceBase.h @@ -9,6 +9,7 @@ namespace MyGrate { public: virtual ~EventSourceBase() = default; virtual void readEvents(EventHandlerBase &) = 0; + virtual void stopEvents() = 0; }; using EventSourceBasePtr = std::unique_ptr<EventSourceBase>; } 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; |