Migrate to new project structure.

This commit is contained in:
Alexander Koshkin
2019-01-09 21:38:56 +03:00
parent 880ae748d1
commit ce6ddb27a9
69 changed files with 132 additions and 100 deletions

View File

@ -0,0 +1,25 @@
from abc import ABC, abstractmethod
class IPeerMetadata(ABC):
def __init__(self):
pass
@abstractmethod
def get(self, peer_id, key):
"""
:param peer_id: peer ID to lookup key for
:param key: key to look up
:return: value at key for given peer
:raise Exception: peer ID not found
"""
@abstractmethod
def put(self, peer_id, key, val):
"""
:param peer_id: peer ID to lookup key for
:param key: key to associate with peer
:param val: value to associated with key
:raise Exception: unsuccessful put
"""