mirror of
https://github.com/status-im/consul.git
synced 2025-01-24 12:40:17 +00:00
Adding a ReconcileInterval config
This commit is contained in:
parent
679dae613e
commit
a0338f14cd
@ -7,6 +7,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -54,6 +55,12 @@ type Config struct {
|
|||||||
// SerfWANConfig is the configuration for the cross-dc serf
|
// SerfWANConfig is the configuration for the cross-dc serf
|
||||||
SerfWANConfig *serf.Config
|
SerfWANConfig *serf.Config
|
||||||
|
|
||||||
|
// ReconcileInterval controls how often we reconcile the strongly
|
||||||
|
// consistent store with the Serf info. This is used to handle nodes
|
||||||
|
// that are force removed, as well as intermittent unavailability during
|
||||||
|
// leader election.
|
||||||
|
ReconcileInterval time.Duration
|
||||||
|
|
||||||
// LogOutput is the location to write logs to. If this is not set,
|
// LogOutput is the location to write logs to. If this is not set,
|
||||||
// logs will go to stderr.
|
// logs will go to stderr.
|
||||||
LogOutput io.Writer
|
LogOutput io.Writer
|
||||||
@ -67,12 +74,13 @@ func DefaultConfig() *Config {
|
|||||||
}
|
}
|
||||||
|
|
||||||
conf := &Config{
|
conf := &Config{
|
||||||
Datacenter: DefaultDC,
|
Datacenter: DefaultDC,
|
||||||
NodeName: hostname,
|
NodeName: hostname,
|
||||||
RPCAddr: DefaultRPCAddr,
|
RPCAddr: DefaultRPCAddr,
|
||||||
RaftConfig: raft.DefaultConfig(),
|
RaftConfig: raft.DefaultConfig(),
|
||||||
SerfLANConfig: serf.DefaultConfig(),
|
SerfLANConfig: serf.DefaultConfig(),
|
||||||
SerfWANConfig: serf.DefaultConfig(),
|
SerfWANConfig: serf.DefaultConfig(),
|
||||||
|
ReconcileInterval: 60 * time.Second,
|
||||||
}
|
}
|
||||||
|
|
||||||
// WAN Serf should use the WAN timing, since we are using it
|
// WAN Serf should use the WAN timing, since we are using it
|
||||||
|
Loading…
x
Reference in New Issue
Block a user