17c778de15
* added file * basic interface modeled on go repo * fixed linting * updated based on comments
18 lines
471 B
Python
18 lines
471 B
Python
from abc import ABC, abstractmethod
|
|
# pylint: disable=too-few-public-methods
|
|
|
|
|
|
class IDiscoverer(ABC):
|
|
|
|
def __init__(self):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def find_peers(self, service):
|
|
"""
|
|
Find peers on the networking providing a particular service
|
|
:param service: service that peers must provide
|
|
:return: PeerInfo generator that yields PeerInfo objects for discovered peers
|
|
:raise Exception: network error
|
|
"""
|