2019-02-11 07:15:15 +08:00
|
|
|
from abc import ABC, abstractmethod
|
2019-02-11 09:22:01 +08:00
|
|
|
# pylint: disable=too-few-public-methods
|
2019-02-11 07:15:15 +08:00
|
|
|
|
|
|
|
|
|
|
|
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: peerstore containing found peers on the network
|
|
|
|
:raise Exception: network error
|
|
|
|
"""
|