mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Split sync/async handling into the BIF methods
This commit is contained in:
parent
c247de8ec3
commit
e766af7322
8 changed files with 260 additions and 181 deletions
|
@ -13,7 +13,7 @@ struct redisPollEvents;
|
|||
namespace zeek::storage::backend::redis {
|
||||
class Redis : public Backend, public iosource::IOSource {
|
||||
public:
|
||||
Redis(std::string_view tag) : Backend(true, tag), IOSource(true) {}
|
||||
Redis(std::string_view tag) : Backend(SupportedModes::ASYNC, tag), IOSource(true) {}
|
||||
~Redis() override = default;
|
||||
|
||||
static BackendPtr Instantiate(std::string_view tag);
|
||||
|
@ -81,9 +81,11 @@ public:
|
|||
// themselves from the list of active operations.
|
||||
void HandleGeneric() { --active_ops; }
|
||||
|
||||
protected:
|
||||
void Poll() override;
|
||||
|
||||
private:
|
||||
ValResult ParseGetReply(redisReply* reply) const;
|
||||
void Poll();
|
||||
|
||||
redisAsyncContext* async_ctx = nullptr;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue