From d22b66483bce8843110795609386edc6ebf65b69 Mon Sep 17 00:00:00 2001 From: dormando Date: Wed, 10 Jun 2020 22:56:07 -0700 Subject: 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. --- proto_proxy.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 proto_proxy.h (limited to 'proto_proxy.h') 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 -- cgit v1.2.1