diff --git a/example/services/main.go b/example/services/main.go index 2d7c997..aebeea4 100644 --- a/example/services/main.go +++ b/example/services/main.go @@ -9,20 +9,20 @@ import ( func main() { // you can override the below config by settings env vars - _ = os.Setenv("SERVICE_ZAP_ENABLED", "false") - _ = os.Setenv("SERVICE_VIPER_ENABLED", "false") - _ = os.Setenv("SERVICE_PROMETHEUS_ENABLED", "false") + _ = os.Setenv("SERVICE_ZAP_ENABLED", "true") + _ = os.Setenv("SERVICE_VIPER_ENABLED", "true") + _ = os.Setenv("SERVICE_PROMETHEUS_ENABLED", "true") svr := keel.NewServer( // add zap service listening on localhost:9100 // allows you to view / change the log level: GET / PUT localhost:9100/log - keel.WithHTTPZapService(true), + keel.WithHTTPZapService(false), // add viper service listening on localhost:9300 // allows you to view / change the configuration: GET / PUT localhost:9300/config - keel.WithHTTPViperService(true), + keel.WithHTTPViperService(false), // add prometheus service listening on 0.0.0.0:9200 // allows you to collect prometheus metrics: GET 0.0.0.0:9200/metrics - keel.WithHTTPPrometheusService(true), + keel.WithHTTPPrometheusService(false), ) l := svr.Logger() diff --git a/go.mod b/go.mod index 824803b..fb3ce71 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,9 @@ module github.com/foomo/keel go 1.16 require ( - github.com/davecgh/go-spew v1.1.1 github.com/golang-jwt/jwt v3.2.2+incompatible github.com/google/uuid v1.1.2 + github.com/mitchellh/mapstructure v1.1.2 github.com/nats-io/nats.go v1.12.0 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.10.0 @@ -25,5 +25,4 @@ require ( go.uber.org/zap v1.16.0 golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b golang.org/x/sync v0.0.0-20210220032951-036812b2e83c - gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c ) diff --git a/server_test.go b/server_test.go index 5387603..8b4fc84 100644 --- a/server_test.go +++ b/server_test.go @@ -92,8 +92,8 @@ func (s *KeelTestSuite) TestServiceHTTPZap() { } s.svr.AddServices( - keel.NewServiceHTTPZap(s.l, "zap", ":9100", "log"), - keel.NewServiceHTTP(log.Logger(), "test", ":55000", s.mux), + keel.NewServiceHTTPZap(s.l, "zap", ":9100", "/log"), + keel.NewServiceHTTP(s.l, "test", ":55000", s.mux), ) go s.svr.Run()