diff options
author | dormando <dormando@rydia.net> | 2022-08-08 16:27:22 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2022-08-24 22:32:40 -0700 |
commit | 6bcc5b8553d43f494e85ab3ec2ce789c38a3ca33 (patch) | |
tree | d49f62392b0b40419567014621877b5581885e72 /proxy.h | |
parent | 2bdf0ec3c8d89d7b75cb8ba7f1290cd937595669 (diff) | |
download | memcached-6bcc5b8553d43f494e85ab3ec2ce789c38a3ca33.tar.gz |
proxy: mcp.attach(CMD, r, "tag")
allows using tagged listeners (ex; `-l tag[test]:127.0.0.1:11212`) to
select a top level route for a function.
expects there to not be dozens of listeners, but for a handful will be
faster than a hash table lookup.
Diffstat (limited to 'proxy.h')
-rw-r--r-- | proxy.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -218,9 +218,15 @@ typedef struct { pthread_mutex_t stats_lock; // used for rare global counters } proxy_ctx_t; +struct proxy_hook_tagged { + uint64_t tag; + int lua_ref; +}; + struct proxy_hook { int lua_ref; - bool is_lua; // pull the lua reference and call it as a lua function. + int tagcount; + struct proxy_hook_tagged *tagged; // array of possible tagged hooks. }; // TODO (v2): some hash functions (crc?) might require initializers. If we run into |