Refactor some module imports/exports

This commit is contained in:
Raycho Mukelov 2023-09-01 01:00:39 +03:00
parent 634094f766
commit a69f528bc1
5 changed files with 7 additions and 12 deletions

View File

@ -11,6 +11,8 @@ import basic_timers
import basic_state_machine
import ../raft/raft_api
export raft_api
type
BasicRaftNode* = RaftNode[SmCommand, SmState]

View File

@ -7,9 +7,10 @@
# This file may not be copied, modified, or distributed except according to
# those terms.
import ../raft/types
import std/tables
export tables
import ../raft/raft_api
export tables, raft_api
type
SmState* = Table[string, string]

View File

@ -8,20 +8,15 @@
# those terms.
import std/asyncdispatch
import std/locks
import ../raft/types
import uuids
import ../raft/raft_api
export asyncdispatch
export asyncdispatch, raft_api
var
pollThr: Thread[void]
runningMtx: Lock
running: bool
timersChan: seq[RaftTimer]
timersChanMtx: Lock
proc RaftTimerCreateCustomImpl*(timerInterval: int, oneshot: bool, timerCallback: RaftTimerCallback): RaftTimer {.nimcall, gcsafe.} =
var
timer = RaftTimer(mtx: Lock(), canceled: false, expired: false, timeout: timerInterval, oneshot: oneshot)

View File

@ -9,7 +9,6 @@
import unittest2
import basic_cluster
import ../raft/types
proc basicClusterMain*() =
var

View File

@ -8,8 +8,6 @@
# those terms.
import unittest2
import ../raft/types
import std/locks
import basic_timers
import random