Flips the sense of the coordinate enable option.
This commit is contained in:
parent
9c069c5031
commit
b6c31bdf2f
|
@ -193,7 +193,7 @@ func Create(config *Config, logOutput io.Writer) (*Agent, error) {
|
|||
go agent.handleEvents()
|
||||
|
||||
// Start sending network coordinate to the server.
|
||||
if config.EnableCoordinates {
|
||||
if !config.DisableCoordinates {
|
||||
go agent.sendCoordinate()
|
||||
}
|
||||
|
||||
|
|
|
@ -372,8 +372,8 @@ type Config struct {
|
|||
// representation of our state. Defaults to every 60s.
|
||||
AEInterval time.Duration `mapstructure:"-" json:"-"`
|
||||
|
||||
// EnableCoordinates enables features related to network coordinates.
|
||||
EnableCoordinates bool `mapstructure:"enable_coordinates" json:"-"`
|
||||
// DisableCoordinates controls features related to network coordinates.
|
||||
DisableCoordinates bool `mapstructure:"disable_coordinates" json:"-"`
|
||||
|
||||
// SyncCoordinateInterval controls the interval for sending network
|
||||
// coordinates to the server. Defaults to every 15s, but scales up as
|
||||
|
@ -475,7 +475,7 @@ func DefaultConfig() *Config {
|
|||
Protocol: consul.ProtocolVersionMax,
|
||||
CheckUpdateInterval: 5 * time.Minute,
|
||||
AEInterval: time.Minute,
|
||||
EnableCoordinates: true,
|
||||
DisableCoordinates: false,
|
||||
SyncCoordinateInterval: 15 * time.Second,
|
||||
ACLTTL: 30 * time.Second,
|
||||
ACLDownPolicy: "extend-cache",
|
||||
|
|
|
@ -139,7 +139,7 @@ func (c *Client) setupSerf(conf *serf.Config, ch chan serf.Event, path string) (
|
|||
conf.ProtocolVersion = protocolVersionMap[c.config.ProtocolVersion]
|
||||
conf.RejoinAfterLeave = c.config.RejoinAfterLeave
|
||||
conf.Merge = &lanMergeDelegate{dc: c.config.Datacenter}
|
||||
conf.EnableCoordinates = c.config.EnableCoordinates
|
||||
conf.DisableCoordinates = c.config.DisableCoordinates
|
||||
conf.CacheCoordinates = false
|
||||
if err := ensurePath(conf.SnapshotPath, false); err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -203,8 +203,8 @@ type Config struct {
|
|||
// user events. This function should not block.
|
||||
UserEventHandler func(serf.UserEvent)
|
||||
|
||||
// EnableCoordinates enables features related to network coordinates.
|
||||
EnableCoordinates bool
|
||||
// DisableCoordinates controls features related to network coordinates.
|
||||
DisableCoordinates bool
|
||||
|
||||
// CoordinateUpdatePeriod controls how long a server batches coordinate
|
||||
// updates before applying them in a Raft transaction. A larger period
|
||||
|
@ -269,7 +269,7 @@ func DefaultConfig() *Config {
|
|||
TombstoneTTL: 15 * time.Minute,
|
||||
TombstoneTTLGranularity: 30 * time.Second,
|
||||
SessionTTLMin: 10 * time.Second,
|
||||
EnableCoordinates: true,
|
||||
DisableCoordinates: false,
|
||||
CoordinateUpdatePeriod: 30 * time.Second,
|
||||
CoordinateUpdateMaxBatchSize: 1000,
|
||||
}
|
||||
|
|
|
@ -312,8 +312,8 @@ func (s *Server) setupSerf(conf *serf.Config, ch chan serf.Event, path string, w
|
|||
// Let Serf cache coordinates for only the WAN configuration where the
|
||||
// number of nodes should be small, and where we serve these directly
|
||||
// from Serf because they aren't managed in the catalog.
|
||||
conf.EnableCoordinates = s.config.EnableCoordinates
|
||||
conf.CacheCoordinates = s.config.EnableCoordinates && wan
|
||||
conf.DisableCoordinates = s.config.DisableCoordinates
|
||||
conf.CacheCoordinates = (!s.config.DisableCoordinates) && wan
|
||||
|
||||
return serf.Create(conf)
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ func testServerConfig(t *testing.T, NodeName string) (string, *Config) {
|
|||
|
||||
config.ReconcileInterval = 100 * time.Millisecond
|
||||
|
||||
config.EnableCoordinates = true
|
||||
config.DisableCoordinates = false
|
||||
config.CoordinateUpdatePeriod = 0 * time.Millisecond
|
||||
return dir, config
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue