From 0dc44d54cfcc9dd3fa09a41136f35a9a8d26b994 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Tue, 13 Oct 2020 13:55:20 +0300 Subject: Initial commit of RR 2.0 --- service/health/config.go | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 service/health/config.go (limited to 'service/health/config.go') diff --git a/service/health/config.go b/service/health/config.go deleted file mode 100644 index 60a52d6e..00000000 --- a/service/health/config.go +++ /dev/null @@ -1,32 +0,0 @@ -package health - -import ( - "errors" - "strings" - - "github.com/spiral/roadrunner/service" -) - -// Config configures the health service -type Config struct { - // Address to listen on - Address string -} - -// Hydrate the config -func (c *Config) Hydrate(cfg service.Config) error { - if err := cfg.Unmarshal(c); err != nil { - return err - } - return c.Valid() -} - -// Valid validates the configuration. -func (c *Config) Valid() error { - // Validate the address - if c.Address != "" && !strings.Contains(c.Address, ":") { - return errors.New("malformed http server address") - } - - return nil -} -- cgit v1.2.3