some cleanup
This commit is contained in:
@@ -287,28 +287,6 @@ var (
|
||||
DefaultDatastoreNamespace = "/raft"
|
||||
)
|
||||
|
||||
//func DefaultClusterRaftConfig() *ClusterRaftConfig {
|
||||
// var cfg ClusterRaftConfig
|
||||
// cfg.DataFolder = "" // empty so it gets omitted
|
||||
// cfg.InitPeerset = []peer.ID{}
|
||||
// cfg.WaitForLeaderTimeout = Duration(DefaultWaitForLeaderTimeout)
|
||||
// cfg.NetworkTimeout = Duration(DefaultNetworkTimeout)
|
||||
// cfg.CommitRetries = DefaultCommitRetries
|
||||
// cfg.CommitRetryDelay = Duration(DefaultCommitRetryDelay)
|
||||
// cfg.BackupsRotate = DefaultBackupsRotate
|
||||
// cfg.DatastoreNamespace = DefaultDatastoreNamespace
|
||||
// cfg.RaftConfig = hraft.DefaultConfig()
|
||||
//
|
||||
// // These options are imposed over any Default Raft Config.
|
||||
// cfg.RaftConfig.ShutdownOnRemove = false
|
||||
// cfg.RaftConfig.LocalID = "will_be_set_automatically"
|
||||
//
|
||||
// // Set up logging
|
||||
// cfg.RaftConfig.LogOutput = ioutil.Discard
|
||||
// //cfg.RaftConfig.Logger = &hcLogToLogger{}
|
||||
// return &cfg
|
||||
//}
|
||||
|
||||
func DefaultUserRaftConfig() *UserRaftConfig {
|
||||
var cfg UserRaftConfig
|
||||
cfg.DataFolder = "" // empty so it gets omitted
|
||||
|
||||
@@ -610,42 +610,6 @@ type FeeConfig struct {
|
||||
DefaultMaxFee types.FIL
|
||||
}
|
||||
|
||||
//// ClusterRaftConfig allows to configure the Raft Consensus component for the node cluster.
|
||||
//type ClusterRaftConfig struct {
|
||||
// // config to enabled node cluster with raft consensus
|
||||
// ClusterModeEnabled bool
|
||||
// // will shutdown libp2p host on shutdown. Useful for testing
|
||||
// HostShutdown bool
|
||||
// // A folder to store Raft's data.
|
||||
// DataFolder string
|
||||
// // InitPeerset provides the list of initial cluster peers for new Raft
|
||||
// // peers (with no prior state). It is ignored when Raft was already
|
||||
// // initialized or when starting in staging mode.
|
||||
// InitPeerset []peer.ID
|
||||
// // LeaderTimeout specifies how long to wait for a leader before
|
||||
// // failing an operation.
|
||||
// WaitForLeaderTimeout Duration
|
||||
// // NetworkTimeout specifies how long before a Raft network
|
||||
// // operation is timed out
|
||||
// NetworkTimeout Duration
|
||||
// // CommitRetries specifies how many times we retry a failed commit until
|
||||
// // we give up.
|
||||
// CommitRetries int
|
||||
// // How long to wait between retries
|
||||
// CommitRetryDelay Duration
|
||||
// // BackupsRotate specifies the maximum number of Raft's DataFolder
|
||||
// // copies that we keep as backups (renaming) after cleanup.
|
||||
// BackupsRotate int
|
||||
// // Namespace to use when writing keys to the datastore
|
||||
// DatastoreNamespace string
|
||||
//
|
||||
// // A Hashicorp Raft's configuration object.
|
||||
// RaftConfig *hraft.Config
|
||||
//
|
||||
// // Tracing enables propagation of contexts across binary boundaries.
|
||||
// Tracing bool
|
||||
//}
|
||||
|
||||
type UserRaftConfig struct {
|
||||
// config to enabled node cluster with raft consensus
|
||||
ClusterModeEnabled bool
|
||||
|
||||
Reference in New Issue
Block a user