minos.networks.brokers.dynamic.pools module¶
- class minos.networks.brokers.dynamic.pools.DynamicBrokerPool(config, client, consumer, publisher, maxsize=5, recycle=3600, *args, **kwargs)[source]¶
Bases:
minos.common.pools.MinosPool
Dynamic Broker Pool class.
- acquire(*args, **kwargs)[source]¶
Acquire a new instance wrapped on an asynchronous context manager.
- Return type
typing.AsyncContextManager
- Returns
An asynchronous context manager.
- property already_destroyed: bool¶
Already Destroy getter.
- Return type
bool
- Returns
A boolean value.
- property already_setup: bool¶
Already Setup getter.
- Return type
bool
- Returns
A boolean value.
- async close(timeout=None)¶
- Return type
None
- async destroy()¶
Destroy miscellaneous repository things.
- Return type
None
- Returns
This method does not return anything.
- classmethod from_config(config=None, **kwargs)¶
Build a new instance from config.
- Parameters
config (
typing.Union
[minos.common.configuration.config.MinosConfig
,pathlib.Path
,None
]) – Config instance. If None is provided, default config is chosen.kwargs – Additional named arguments.
- Return type
~S
- Returns
A instance of the called class.
- async setup()¶
Setup miscellaneous repository things.
- Return type
None
- Returns
This method does not return anything.