| 61 | } |
| 62 | |
| 63 | type Node struct { |
| 64 | config *Config |
| 65 | |
| 66 | addr string |
| 67 | raftNode raft.Node |
| 68 | transport *rafthttp.Transport |
| 69 | httpServer *http.Server |
| 70 | dataStore *DataStore |
| 71 | leaderChanged chan bool |
| 72 | logger *zap.Logger |
| 73 | peers sync.Map |
| 74 | |
| 75 | leader uint64 |
| 76 | appliedIndex uint64 |
| 77 | snapshotIndex uint64 |
| 78 | confState raftpb.ConfState |
| 79 | snapshotThreshold atomic.Uint64 |
| 80 | compactThreshold atomic.Uint64 |
| 81 | |
| 82 | wg sync.WaitGroup |
| 83 | shutdown chan struct{} |
| 84 | |
| 85 | isRunning atomic.Bool |
| 86 | } |
| 87 | |
| 88 | var _ engine.Engine = (*Node)(nil) |
| 89 |
nothing calls this directly
no outgoing calls
no test coverage detected