small pixel drawing of a pufferfish cascade

gofmt
Jes Olson j3s@c3f.net
Fri, 17 Feb 2023 21:51:25 -0800
commit

516210bc28237b018f30aab25abc2011a3f1f0aa

parent

5d051cf691b511cb36c4f748b5dacf329b97249c

3 files changed, 8 insertions(+), 8 deletions(-)

jump to
M agent.goagent.go

@@ -37,7 +37,6 @@

return agent } - func (a *Agent) eventLoop() { serfShutdownCh := a.serf.ShutdownCh() for {
M config.goconfig.go

@@ -29,10 +29,10 @@ port int

} type Config struct { - BindAddr string - NodeName string + BindAddr string + NodeName string StartJoin []string - Services []Service + Services []Service } // lifted from serf, could be simplified
M main.gomain.go

@@ -23,7 +23,8 @@ )

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 @@ // -1 or whatever to the node. that would be more user friendly.

// 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