mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2024-10-01 03:35:38 -04:00
config: Add the section name to the config class.
This commit is contained in:
parent
3d34a26dac
commit
0d89987ec1
@ -74,6 +74,7 @@ class ServerConfig:
|
|||||||
"""Server configuration.
|
"""Server configuration.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
name (str): A unique user chosen name that identifies the server.
|
||||||
homeserver (ParseResult): The URL of the Matrix homeserver that we want
|
homeserver (ParseResult): The URL of the Matrix homeserver that we want
|
||||||
to forward requests to.
|
to forward requests to.
|
||||||
listen_address (str): The local address where pantalaimon will listen
|
listen_address (str): The local address where pantalaimon will listen
|
||||||
@ -87,7 +88,8 @@ class ServerConfig:
|
|||||||
pantalaimon and the homeserver.
|
pantalaimon and the homeserver.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
homeserver = attr.ib()
|
name = attr.ib(type=str)
|
||||||
|
homeserver = attr.ib(type=ParseResult)
|
||||||
listen_address = attr.ib(type=Union[IPv4Address, IPv6Address])
|
listen_address = attr.ib(type=Union[IPv4Address, IPv6Address])
|
||||||
listen_port = attr.ib(type=int)
|
listen_port = attr.ib(type=int)
|
||||||
proxy = attr.ib(type=str)
|
proxy = attr.ib(type=str)
|
||||||
@ -152,6 +154,7 @@ class PanConfig:
|
|||||||
listen_set.add(listen_tuple)
|
listen_set.add(listen_tuple)
|
||||||
|
|
||||||
server_conf = ServerConfig(
|
server_conf = ServerConfig(
|
||||||
|
section_name,
|
||||||
homeserver,
|
homeserver,
|
||||||
listen_address,
|
listen_address,
|
||||||
listen_port,
|
listen_port,
|
||||||
|
Loading…
Reference in New Issue
Block a user