From becd086865f35d64a80d01ffb1ca96d0493dfa03 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sun, 11 Nov 2018 15:54:19 -0800 Subject: Add config options to disable HTTP and scheduler services --- config/config.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'config/config.go') diff --git a/config/config.go b/config/config.go index 281a8a3..7ba3a93 100644 --- a/config/config.go +++ b/config/config.go @@ -214,6 +214,16 @@ func (c *Config) ProxyImages() string { return getStringValue("PROXY_IMAGES", defaultProxyImages) } +// HasHTTPService returns true if the HTTP service is enabled. +func (c *Config) HasHTTPService() bool { + return !getBooleanValue("DISABLE_HTTP_SERVICE") +} + +// HasSchedulerService returns true if the scheduler service is enabled. +func (c *Config) HasSchedulerService() bool { + return !getBooleanValue("DISABLE_SCHEDULER_SERVICE") +} + // NewConfig returns a new Config. func NewConfig() *Config { cfg := &Config{ -- cgit v1.2.3