minos.plugins.aiohttp.connectors
Classes
AioHttp Connector class. |
- class AioHttpConnector[source]
Bases:
HttpConnector
[Request
,Response
]AioHttp Connector class.
- property runner: Optional[aiohttp.web_runner.AppRunner]
Get the application runner.
- Returns
An
AppRunner
instance orNone
.
- property site: Optional[aiohttp.web_runner.TCPSite]
Get the application site.
- Returns
A
SockSite
instance orNone
.
- application
Get the application.
- Returns
An
Application
instance.
- adapt_callback(callback)
Get the adapted callback to be used by the connector.
- property adapter: minos.networks.http.adapters.HttpAdapter
Get the port.
- Returns
A
int
value.
- async destroy()
Destroy miscellaneous repository things.
- Returns
This method does not return anything.
- Return type
None
- classmethod from_config(config=None, **kwargs)
Build a new instance from config.
- Parameters
config (Optional[Union[Config, Path]]) – Config instance. If None is provided, default config is chosen.
kwargs – Additional named arguments.
- Returns
A instance of the called class.
- Return type
S
- mount_route(path, method, callback)
Mount a new route on the application.
- mount_routes()
Mount the routes given by the adapter.
- Returns
This method does not return anything.
- Return type
None
- property routes: dict[minos.networks.decorators.definitions.http.abc.HttpEnrouteDecorator, collections.abc.Callable[[minos.networks.requests.abc.Request], Union[minos.networks.requests.abc.Response, NoneType, Awaitable[Optional[minos.networks.requests.abc.Response]]]]]
Get the port.
- Returns
A
int
value.
- async setup()
Setup miscellaneous repository things.
- Returns
This method does not return anything.
- Return type
None
- async start()
Start the connector.
- Returns
This method does not return anything.
- Return type
None
- async stop()
Stop the connector.
- Returns
This method does not return anything.
- Return type
None