代码拉取完成,页面将自动刷新
// Copyright 2016 DeepFabric, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// See the License for the specific language governing permissions and
// limitations under the License.
package raftstore
import (
"fmt"
"time"
)
// Cfg for raftstore
type Cfg struct {
Addr string
AdvertiseAddr string
AdvertiseAddrCli string
DataPath string
OptionPath string
CellCapacity uint64
DurationHeartbeatStore time.Duration
DurationHeartbeatCell time.Duration
DurationSplitCheck time.Duration
DurationCompact time.Duration
DurationReportMetric time.Duration
DurationRaftTick time.Duration
DurationRetrySentSnapshot time.Duration
LimitPeerDownDuration time.Duration
LimitCompactCount uint64
LimitCompactBytes uint64
LimitCompactLag uint64
LimitRaftMsgCount int
LimitRaftMsgBytes uint64
LimitRaftEntryBytes uint64
LimitSnapChunkBytes uint64
LimitSnapChunkRate uint64
LimitConcurrencyWrite uint64
LimitNemoInstance int
ThresholdCompact uint64
ThresholdSplitCheckBytes uint64
ThresholdRaftElection int
ThresholdRaftHeartbeat int
BatchSizeProposal uint64
BatchSizeSent uint64
WorkerCountSent uint64
WorkerCountSentSnap uint64
WorkerCountApply uint64
EnableSyncRaftLog bool
EnableMetricsRequest bool
}
// NewCfg return default cfg
func NewCfg() *Cfg {
return &Cfg{}
}
func (c *Cfg) getSnapDir() string {
return fmt.Sprintf("%s/%s", c.DataPath, getSnapDirName())
}
func getSnapDirName() string {
return "snap"
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。