Crates.io | haproxy-api |
lib.rs | haproxy-api |
version | 0.8.2 |
source | src |
created_at | 2020-05-21 11:03:20.049755 |
updated_at | 2024-08-06 17:06:06.615538 |
description | HAProxy 2.8+ Lua API |
homepage | |
repository | https://github.com/khvzak/haproxy-api-rs |
max_upload_size | |
id | 244055 |
size | 79,236 |
haproxy-api
exposes HAProxy 2.8+ Lua API to use from Rust.
In conjunction with mlua it allows to run Rust code in HAProxy as a Task/Converter/Fetcher/Service/etc.
You can extend HAProxy on a safe and efficient way beyond Lua restrictions.
Asynchronous mode is supported using Tokio runtime. The HAProxy runtime is fully integrated with Tokio runtime using HAProxy queueing system and auxiliary tcp listener for async tasks readiness notifications.
A multi-threaded tokio runtime is automatically started when the first async function is executed.
Please check the async_serve_file example to see how to serve files asynchronously.
Please check our examples:
Executing HAProxy functions that require yielding is not supported (eg: core.sleep
), and these functionality is not exposed.
Although you can run them from Lua or using register_lua_*
set of functions.
This project is licensed under the MIT license