initial concept for replicate, basic leader and follower logic

This commit is contained in:
Timothy Pogue
2022-08-18 10:39:20 -06:00
committed by robcaulk
parent 85b43ec1a1
commit 9f6bba40af
16 changed files with 1330 additions and 4 deletions

View File

@@ -54,7 +54,11 @@ class ApiServer(RPCHandler):
ApiServer.__initialized = False
return ApiServer.__instance
def __init__(self, config: Dict[str, Any], standalone: bool = False) -> None:
def __init__(
self,
config: Dict[str, Any],
standalone: bool = False,
) -> None:
ApiServer._config = config
if self.__initialized and (standalone or self._standalone):
return
@@ -71,8 +75,6 @@ class ApiServer(RPCHandler):
)
self.configure_app(self.app, self._config)
self.start_api()
def add_rpc_handler(self, rpc: RPC):
"""
Attach rpc handler