NodeTransport is a wrapper around the Raft NetworkTransport, which allows custom configuration of the InstallSnapshot method.
| 55 | // NodeTransport is a wrapper around the Raft NetworkTransport, which allows |
| 56 | // custom configuration of the InstallSnapshot method. |
| 57 | type NodeTransport struct { |
| 58 | *raft.NetworkTransport |
| 59 | compressSnap bool |
| 60 | |
| 61 | aeMu sync.RWMutex |
| 62 | appendEntriesTxHandler func(req *raft.AppendEntriesRequest) error |
| 63 | appendEntriesRxHandler func(req *raft.AppendEntriesRequest) error |
| 64 | |
| 65 | commandCommitIndex *atomic.Uint64 |
| 66 | leaderCommitIndex *atomic.Uint64 |
| 67 | done chan struct{} |
| 68 | closed bool |
| 69 | logger *log.Logger |
| 70 | } |
| 71 | |
| 72 | // NewNodeTransport returns an initialized NodeTransport. |
| 73 | func NewNodeTransport(transport *raft.NetworkTransport, compressSnap bool) *NodeTransport { |
nothing calls this directly
no outgoing calls
no test coverage detected