Documentation ¶
Index ¶
Constants ¶
View Source
const MB = 1024 * 1024
MB represents the MB size.
Variables ¶
View Source
var DefaultConf = Config{ Config: config.DefaultConf, RaftStore: RaftStore{ PdHeartbeatTickInterval: "20s", RaftStoreMaxLeaderLease: "9s", RaftBaseTickInterval: "1s", RaftHeartbeatTicks: 2, RaftElectionTimeoutTicks: 10, CustomRaftLog: true, }, }
DefaultConf returns the default configuration.
Functions ¶
func ParseCompression ¶
func ParseCompression(s string) options.CompressionType
ParseCompression parses the string s and returns a compression type.
func ParseDuration ¶
ParseDuration parses duration argument string.
Types ¶
type RaftStore ¶
type RaftStore struct { PdHeartbeatTickInterval string `toml:"pd-heartbeat-tick-interval"` // pd-heartbeat-tick-interval in seconds RaftStoreMaxLeaderLease string `toml:"raft-store-max-leader-lease"` // raft-store-max-leader-lease in milliseconds RaftBaseTickInterval string `toml:"raft-base-tick-interval"` // raft-base-tick-interval in milliseconds RaftHeartbeatTicks int `toml:"raft-heartbeat-ticks"` // raft-heartbeat-ticks times RaftElectionTimeoutTicks int `toml:"raft-election-timeout-ticks"` // raft-election-timeout-ticks times CustomRaftLog bool `toml:"custom-raft-log"` }
RaftStore is the config for raft store.
Click to show internal directories.
Click to hide internal directories.