summaryrefslogtreecommitdiff
path: root/proto_proxy.h
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2020-06-10 22:56:07 -0700
committerdormando <dormando@rydia.net>2021-10-05 12:21:25 -0700
commitd22b66483bce8843110795609386edc6ebf65b69 (patch)
treeac2107f9450c857d9ed125a17aef79a4158da7f9 /proto_proxy.h
parent56dc81db316a0b957415e371d20c683fea9d7d2f (diff)
downloadmemcached-d22b66483bce8843110795609386edc6ebf65b69.tar.gz
proxy: initial commit.
See BUILD for compilation details. See t/startfile.lua for configuration examples. (see also https://github.com/memcached/memcached-proxylibs for extensions, config libraries, more examples) NOTE: io_uring mode is _not stable_, will crash. As of this commit it is not recommended to run the proxy in production. If you are interested please let us know, as we are actively stabilizing for production use.
Diffstat (limited to 'proto_proxy.h')
-rw-r--r--proto_proxy.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/proto_proxy.h b/proto_proxy.h
new file mode 100644
index 0000000..aa58323
--- /dev/null
+++ b/proto_proxy.h
@@ -0,0 +1,26 @@
+#ifndef PROTO_PROXY_H
+#define PROTO_PROXY_H
+
+void proxy_stats(ADD_STAT add_stats, conn *c);
+void process_proxy_stats(ADD_STAT add_stats, conn *c);
+
+/* proxy mode handlers */
+int try_read_command_proxy(conn *c);
+void complete_nread_proxy(conn *c);
+void proxy_thread_init(LIBEVENT_THREAD *thr);
+void proxy_init(void);
+// TODO: need better names or a better interface for these. can be confusing
+// to reason about the order.
+void proxy_start_reload(void *arg);
+int proxy_load_config(void *arg);
+void proxy_worker_reload(void *arg, LIBEVENT_THREAD *thr);
+
+void proxy_submit_cb(io_queue_t *q);
+void proxy_complete_cb(io_queue_t *q);
+void proxy_return_cb(io_pending_t *pending);
+void proxy_finalize_cb(io_pending_t *pending);
+
+/* lua */
+int proxy_register_libs(LIBEVENT_THREAD *t, void *ctx);
+
+#endif