From 660e58d36a30e042c74694a852e67d07e8f9e789 Mon Sep 17 00:00:00 2001 From: Piotr Biernat Date: Wed, 7 Dec 2022 04:11:20 +0100 Subject: [PATCH] Added deregister_critical_service_after=5s opt --- consul/discovery.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/consul/discovery.go b/consul/discovery.go index 928cd56..51b9a3e 100644 --- a/consul/discovery.go +++ b/consul/discovery.go @@ -64,7 +64,8 @@ func (s *Service) Register() error { Port: s.port, Tags: s.getTags(), Check: &consul.AgentServiceCheck{ - TTL: s.ttl.String(), + TTL: s.ttl.String(), + DeregisterCriticalServiceAfter: "5s", }, }