Implemented multiple server cert/key pairs. Implemented mTLS for verifying client using multiple pem files.

This commit is contained in:
Kelvin Clement Mwinuka
2024-02-03 00:24:59 +08:00
parent c0b3fe36a1
commit f9ae87862c
5 changed files with 93 additions and 38 deletions

View File

@@ -39,7 +39,7 @@ func (r *Raft) RaftInit(ctx context.Context) {
raftConfig := raft.DefaultConfig()
raftConfig.LocalID = raft.ServerID(conf.ServerID)
raftConfig.SnapshotThreshold = conf.SnapShotThreshold
raftConfig.SnapshotInterval = time.Duration(conf.SnapshotInterval) * time.Second
raftConfig.SnapshotInterval = conf.SnapshotInterval
var logStore raft.LogStore
var stableStore raft.StableStore