A pure-python asyncio implementation of an HAProxy Stream Processing Offload Agent (SPOA)
Project description
HAProxy SPOA
A pure Python implementation of an HAProxy Stream Processing Offload Agent with asyncio support.
This library handles the lower level details of the Stream Processing Offload Protocol, allowing quick implementation of custom agents.
See the example folder for the full example, including an example HAProxy configuration.
from ipaddress import IPv4Address
from haproxyspoa.payloads.ack import AckPayload
from haproxyspoa.spoa_server import SpoaServer
agent = SpoaServer()
@agent.handler("earth-to-mars")
async def handle_earth_to_mars(src: IPv4Address, req_host: str):
return AckPayload().set_txn_var("src_echo", str(src) + req_host)
if __name__ == "__main__":
agent.run(host='127.0.0.1', port=9002)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file haproxyspoa-0.0.1.tar.gz.
File metadata
- Download URL: haproxyspoa-0.0.1.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5677061489b11a37be2e51a8af2fe75231f9eeb09f81adfa582f667a68f67d58
|
|
| MD5 |
47a816ce99c231ed7ae20d8065e1f297
|
|
| BLAKE2b-256 |
6a82016a188f3f729632623b9f3483ae449542a25c446f186d6083ef22e15ace
|
File details
Details for the file haproxyspoa-0.0.1-py3-none-any.whl.
File metadata
- Download URL: haproxyspoa-0.0.1-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64f4c208c6e4e23f42234dffc69771f3265994ce6e1b7c7788b56319a672ad96
|
|
| MD5 |
42bfe39ac1dadaa578564a7935563ac3
|
|
| BLAKE2b-256 |
f3e7c01247a09062bb6e90fa7d7c3b0861f3743b6e80b5d85efe546481a6fd4c
|