mirror of
https://github.com/hanzozt/zt.git
synced 2026-10-30 15:04:55 +00:00
- Repo names: ziti-* → zt-* - Go modules: github.com/hanzozt/ziti → github.com/hanzozt/zt - Docker images: hanzozt/ziti-* → hanzozt/zt-* - C/Java/JS symbols: ziti_* → zt_* - File and directory names updated
38 lines
771 B
Go
38 lines
771 B
Go
package config
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/hashicorp/go-hclog"
|
|
"github.com/hanzozt/transport/v2"
|
|
"github.com/hanzozt/zt/v2/controller/command"
|
|
)
|
|
|
|
type RaftConfig struct {
|
|
Recover bool
|
|
DataDir string
|
|
RestartSelf bool
|
|
AdvertiseAddress transport.Address
|
|
CommandHandlerOptions struct {
|
|
MaxQueueSize uint16
|
|
}
|
|
|
|
SnapshotInterval time.Duration
|
|
SnapshotThreshold uint32
|
|
TrailingLogs uint32
|
|
MaxAppendEntries *uint32
|
|
|
|
ElectionTimeout time.Duration
|
|
CommitTimeout *time.Duration
|
|
HeartbeatTimeout time.Duration
|
|
LeaderLeaseTimeout time.Duration
|
|
|
|
LogLevel *string
|
|
Logger hclog.Logger
|
|
|
|
WarnWhenLeaderlessFor time.Duration
|
|
|
|
ApplyTimeout time.Duration
|
|
RateLimiter command.AdaptiveRateLimiterConfig
|
|
}
|