From 516210bc28237b018f30aab25abc2011a3f1f0aa Mon Sep 17 00:00:00 2001 From: Jes Olson Date: Fri, 17 Feb 2023 21:51:25 -0800 Subject: [PATCH] gofmt --- agent.go | 1 - config.go | 6 +++--- main.go | 9 +++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/agent.go b/agent.go index 0963ac6..05022c8 100644 --- a/agent.go +++ b/agent.go @@ -37,7 +37,6 @@ func Create(serfConf *serf.Config) *Agent { return agent } - func (a *Agent) eventLoop() { serfShutdownCh := a.serf.ShutdownCh() for { diff --git a/config.go b/config.go index 33ae6ca..63c2356 100644 --- a/config.go +++ b/config.go @@ -29,10 +29,10 @@ type Service struct { } type Config struct { - BindAddr string - NodeName string + BindAddr string + NodeName string StartJoin []string - Services []Service + Services []Service } // lifted from serf, could be simplified diff --git a/main.go b/main.go index ecab29f..15edcde 100644 --- a/main.go +++ b/main.go @@ -23,7 +23,8 @@ import ( const ( // gracefulTimeout controls how long we wait before forcefully terminating - gracefulTimeout = 3 * time.Second + // note that this value interacts with serfConfig.LeavePropagateDelay + gracefulTimeout = 5 * time.Second ) func main() { @@ -139,10 +140,10 @@ func setupAgent(config *Config) *Agent { // TODO: some of these serf settings were pulled // from consul[1]. re-examine them eventually. serfConfig.EnableNameConflictResolution = false - serfConfig.ReconnectTimeout = 3 * 24 * time.Hour - serfConfig.QueueDepthWarning = 1000000 - serfConfig.MinQueueDepth = 4096 serfConfig.LeavePropagateDelay = 3 * time.Second + serfConfig.MinQueueDepth = 4096 + serfConfig.QueueDepthWarning = 1000000 + serfConfig.ReconnectTimeout = 3 * 24 * time.Hour serfConfig.MemberlistConfig = memberlist.DefaultWANConfig() serfConfig.MemberlistConfig.DeadNodeReclaimTime = 30 * time.Second -- 2.51.2