Skip to content

Commit

Permalink
make RingReader::flushGop public
Browse files Browse the repository at this point in the history
  • Loading branch information
xia-chu committed Aug 15, 2024
1 parent a6e30e4 commit 1b36624
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Util/RingBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,6 @@ class _RingReader {
_msg_cb = cb ? std::move(cb) : [](const Any &data) {};
}

private:
void onRead(const T &data, bool /*is_key*/) { _read_cb(data); }
void onMessage(const Any &data) { _msg_cb(data); }
void onDetach() const { _detach_cb(); }
Any getInfo() { return _info_cb(); }

void flushGop() {
if (!_storage) {
return;
Expand All @@ -101,6 +95,11 @@ class _RingReader {
});
}

private:
void onRead(const T &data, bool /*is_key*/) { _read_cb(data); }
void onMessage(const Any &data) { _msg_cb(data); }
void onDetach() const { _detach_cb(); }
Any getInfo() { return _info_cb(); }

private:
std::shared_ptr<_RingStorage<T>> _storage;
Expand Down

0 comments on commit 1b36624

Please sign in to comment.