From ff3889c6aa910671e3e78f4d79772207188fa596 Mon Sep 17 00:00:00 2001 From: Ronan Barrett Date: Thu, 9 Apr 2020 14:38:05 +0200 Subject: [PATCH] add options warning for grace/wait periods --- svc.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/svc.go b/svc.go index 05d0545..64f4116 100644 --- a/svc.go +++ b/svc.go @@ -69,6 +69,11 @@ func New(name, version string, opts ...Option) (*SVC, error) { } } + // Validate some options + if s.TerminationWaitPeriod > 0 && s.TerminationGracePeriod <= s.TerminationWaitPeriod { + s.logger.Warn("termination grace period should be greater than termination wait period") + } + return s, nil }