aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Twisted/py3/twisted/protocols/haproxy/_info.py
diff options
context:
space:
mode:
authorshmel1k <shmel1k@ydb.tech>2023-11-26 18:16:14 +0300
committershmel1k <shmel1k@ydb.tech>2023-11-26 18:43:30 +0300
commitb8cf9e88f4c5c64d9406af533d8948deb050d695 (patch)
tree218eb61fb3c3b96ec08b4d8cdfef383104a87d63 /contrib/python/Twisted/py3/twisted/protocols/haproxy/_info.py
parent523f645a83a0ec97a0332dbc3863bb354c92a328 (diff)
downloadydb-b8cf9e88f4c5c64d9406af533d8948deb050d695.tar.gz
add kikimr_configure
Diffstat (limited to 'contrib/python/Twisted/py3/twisted/protocols/haproxy/_info.py')
-rw-r--r--contrib/python/Twisted/py3/twisted/protocols/haproxy/_info.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/contrib/python/Twisted/py3/twisted/protocols/haproxy/_info.py b/contrib/python/Twisted/py3/twisted/protocols/haproxy/_info.py
new file mode 100644
index 0000000000..9dda6e06ef
--- /dev/null
+++ b/contrib/python/Twisted/py3/twisted/protocols/haproxy/_info.py
@@ -0,0 +1,34 @@
+# -*- test-case-name: twisted.protocols.haproxy.test -*-
+# Copyright (c) Twisted Matrix Laboratories.
+# See LICENSE for details.
+
+"""
+IProxyInfo implementation.
+"""
+from typing import Optional
+
+from zope.interface import implementer
+
+import attr
+
+from twisted.internet.interfaces import IAddress
+from ._interfaces import IProxyInfo
+
+
+@implementer(IProxyInfo)
+@attr.s(frozen=True, slots=True, auto_attribs=True)
+class ProxyInfo:
+ """
+ A data container for parsed PROXY protocol information.
+
+ @ivar header: The raw header bytes extracted from the connection.
+ @type header: C{bytes}
+ @ivar source: The connection source address.
+ @type source: L{twisted.internet.interfaces.IAddress}
+ @ivar destination: The connection destination address.
+ @type destination: L{twisted.internet.interfaces.IAddress}
+ """
+
+ header: bytes
+ source: Optional[IAddress]
+ destination: Optional[IAddress]