From 21a17d27356830e79d25698d7a87bb9f0c8d6dd5 Mon Sep 17 00:00:00 2001 From: Mohammed Sohail Date: Tue, 11 Apr 2023 10:15:33 +0000 Subject: [PATCH] feat: add SLA package which defines a global ctx timeout --- pkg/util/sla.go | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 pkg/util/sla.go diff --git a/pkg/util/sla.go b/pkg/util/sla.go new file mode 100644 index 0000000..ede78b1 --- /dev/null +++ b/pkg/util/sla.go @@ -0,0 +1,8 @@ +package util + +import "time" + +const ( + // SLATimeout is the max duration after which any network call/context should be aborted. + SLATimeout = 5 * time.Second +)