MCPcopy Create free account
hub / github.com/apache/trafficserver / parse_args

Function parse_args

tests/gold_tests/post/expect_client.py:27–41  ·  view source on GitHub ↗

Parse the command line arguments. :return: The parsed arguments.

()

Source from the content-addressed store, hash-verified

25
26
27def parse_args() -> argparse.Namespace:
28 """Parse the command line arguments.
29
30 :return: The parsed arguments.
31 """
32 parser = argparse.ArgumentParser()
33 parser.add_argument("proxy_address", help="Address of the proxy to connect to.")
34 parser.add_argument("proxy_port", type=int, help="The port of the proxy to connect to.")
35 parser.add_argument(
36 '-s',
37 '--server-hostname',
38 dest="server_hostname",
39 default="some.server.com",
40 help="The hostname of the server to connect to.")
41 return parser.parse_args()
42
43
44def open_connection(address: str, port: int) -> socket.socket:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected