Add 'car/' from commit 'eee0e8dc445691e600680f4abc77f2814b20b054'

git-subtree-dir: car
git-subtree-mainline: 1d29a5526c
git-subtree-split: eee0e8dc44
This commit is contained in:
Piv
2020-04-19 11:07:44 +09:30
93 changed files with 8401 additions and 0 deletions

22
car/MyRaft/test.py Normal file
View File

@@ -0,0 +1,22 @@
import argparse
import os.path
import sys
from MyRaft.node import RaftGrpcNode
# parser = argparse.ArgumentParser(description="Runs a raft node for leader election")
# parser.add_argument('-C', '--config', help='Path to config file.')
# args = parser.parse_args()
# if args.config:
# print("Getting config")
# if not os.path.isfile(args.config):
# print("Could not find configuration file, aborting")
# sys.exit(1)
# else:
# sys.exit(1)
# print("Loading gRPC raft node")
node = RaftGrpcNode('config.json')