maker.directory_pool
maker.directory_pool
Maker-specific :class:DirectoryClientPool subclass.
Layers maker-only construction details onto the shared pool:
location-- the bot's published onionhost:port(or the protocol sentinel"NOT-SERVING-ONION"when the maker is not yet serving an onion). Directories use this as the maker's contact address for direct peer connections.neutrino_compat-- whether the backend can answer neutrino-style queries, advertised to directories at handshake time.
Lifecycle hooks (starting listener tasks, announcing offers, emitting
operator notifications) are intentionally NOT placed here -- they remain
in :mod:maker.background_tasks where they have direct access to the
bot's mutable state. This keeps the pool focused on connection
plumbing and matches the taker's separation of concerns.
Classes
MakerDirectoryPool
Bases: DirectoryClientPool
Pool of directory clients for the maker bot.
Adds location and neutrino_compat to the per-connection
DirectoryClient kwargs and otherwise defers to the base
implementation.
Args:
config: The :class:MakerConfig to read onion_host,
onion_serving_port, socks_host, socks_port,
connection_timeout, stream_isolation, and
directory_servers from.
nick_identity: Long-lived directory handshake identity.
neutrino_compat: Advertised to directories; takers use this to
route requests for neutrino-aware metadata.
Source code in maker/src/maker/directory_pool.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
Functions
__init__(*, config: MakerConfig, nick_identity: Any, neutrino_compat: bool)
Source code in maker/src/maker/directory_pool.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |
refresh_neutrino_compat(neutrino_compat: bool) -> None
Update the advertised neutrino capability for future connections.
Existing clients are unaffected; the new value applies to any
subsequent :meth:connect_to_directory /
:meth:reconnect_disconnected call.
Source code in maker/src/maker/directory_pool.py
77 78 79 80 81 82 83 84 85 | |