3.0.ipv8.bootstrapping.bootstrapper_interface ============================================= .. py:module:: 3.0.ipv8.bootstrapping.bootstrapper_interface Classes ------- .. autoapisummary:: 3.0.ipv8.bootstrapping.bootstrapper_interface.Bootstrapper Module Contents --------------- .. py:class:: Bootstrapper Bases: :py:obj:`abc.ABC` A script to connect to external bootstrapping resources, using external hardware. When not to crash: - Loading this module file when missing dependencies. - Initializing a subclass when the service is unavailable (return ``False``). - Failing to retrieve peers for a service (return an empty iterable, e.g. ``[]``). When to crash: - Initializing this module subclass when missing dependencies. .. py:attribute:: initialized :value: False .. py:method:: initialize(overlay: 3.0.ipv8.types.Community) -> asyncio.Future | collections.abc.Coroutine :abstractmethod: Start connecting to this bootstrapping service. Don't perform any network traffic in ``__init__``! You are encourages to implement this method as non-async to have faster bootstrapper inclusion. :param overlay: the network overlay to initialize for. :returns: whether the initialization was successful. .. py:method:: get_addresses(overlay: 3.0.ipv8.types.Community, timeout: float) -> collections.abc.Iterable[3.0.ipv8.types.Address] :abstractmethod: :async: Return some IPv8 addresses (if available) from this bootstrapping service. These addresses should be walkable (not blocked by a NAT or firewall). :param overlay: the network overlay to get peers for. :param timeout: the maximum time we wish to wait until we get any result (i.e. an empty list). :returns: the addresses for the given service_id. .. py:method:: keep_alive(overlay: 3.0.ipv8.types.Community) -> None :abstractmethod: Periodically called to keep this bootstrap connection alive. :param overlay: the network overlay to keep alive. .. py:method:: blacklist() -> collections.abc.Iterable[3.0.ipv8.types.Address] :abstractmethod: Returns the blacklisted addresses for this Bootstrapper. .. py:method:: unload() -> None :abstractmethod: Stop and unload all the resources used by this Bootstrapper.