REDROOM
PHP 8.5.2
Path:
Logout
Edit File
Size: 2.10 KB
Close
//lib/python3/dist-packages/twisted/protocols/haproxy/_parser.py
Text
Base64
# -*- test-case-name: twisted.protocols.haproxy.test.test_parser -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Parser for 'haproxy:' string endpoint. """ from typing import Mapping, Tuple from zope.interface import implementer from twisted.internet import interfaces from twisted.internet.endpoints import ( IStreamServerEndpointStringParser, _WrapperServerEndpoint, quoteStringArgument, serverFromString, ) from twisted.plugin import IPlugin from . import proxyEndpoint def unparseEndpoint(args: Tuple[object, ...], kwargs: Mapping[str, object]) -> str: """ Un-parse the already-parsed args and kwargs back into endpoint syntax. @param args: C{:}-separated arguments @param kwargs: C{:} and then C{=}-separated keyword arguments @return: a string equivalent to the original format which this was parsed as. """ description = ":".join( [quoteStringArgument(str(arg)) for arg in args] + sorted( "{}={}".format( quoteStringArgument(str(key)), quoteStringArgument(str(value)) ) for key, value in kwargs.items() ) ) return description @implementer(IPlugin, IStreamServerEndpointStringParser) class HAProxyServerParser: """ Stream server endpoint string parser for the HAProxyServerEndpoint type. @ivar prefix: See L{IStreamServerEndpointStringParser.prefix}. """ prefix = "haproxy" def parseStreamServer( self, reactor: interfaces.IReactorCore, *args: object, **kwargs: object ) -> _WrapperServerEndpoint: """ Parse a stream server endpoint from a reactor and string-only arguments and keyword arguments. @param reactor: The reactor. @param args: The parsed string arguments. @param kwargs: The parsed keyword arguments. @return: a stream server endpoint @rtype: L{IStreamServerEndpoint} """ subdescription = unparseEndpoint(args, kwargs) wrappedEndpoint = serverFromString(reactor, subdescription) return proxyEndpoint(wrappedEndpoint)
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 8
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
test
DIR
-
drwxr-xr-x
2026-01-08 12:56:22
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__pycache__
DIR
-
drwxr-xr-x
2026-01-08 12:56:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_exceptions.py
1.15 KB
lrw-r--r--
2024-08-27 10:30:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_info.py
917 B
lrw-r--r--
2024-08-27 10:30:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_interfaces.py
1.85 KB
lrw-r--r--
2024-08-27 10:30:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_parser.py
2.10 KB
lrw-r--r--
2024-08-27 10:30:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_v1parser.py
4.39 KB
lrw-r--r--
2024-08-27 10:30:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_v2parser.py
6.47 KB
lrw-r--r--
2024-08-27 10:30:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_wrapper.py
3.59 KB
lrw-r--r--
2024-08-27 10:30:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
243 B
lrw-r--r--
2024-08-27 10:30:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).