From effb05103a003066872193084bd3d42ca17e936f Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Sun, 4 Jun 2017 14:34:31 -0400 Subject: [PATCH] cmd/chihaya: remove extra registration of storages --- cmd/chihaya/config.go | 16 ++++++++-------- cmd/chihaya/main.go | 4 ---- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/cmd/chihaya/config.go b/cmd/chihaya/config.go index 10a2300..5bb1d14 100644 --- a/cmd/chihaya/config.go +++ b/cmd/chihaya/config.go @@ -7,8 +7,8 @@ import ( "gopkg.in/yaml.v2" - httpfrontend "github.com/chihaya/chihaya/frontend/http" - udpfrontend "github.com/chihaya/chihaya/frontend/udp" + "github.com/chihaya/chihaya/frontend/http" + "github.com/chihaya/chihaya/frontend/udp" "github.com/chihaya/chihaya/middleware" "github.com/chihaya/chihaya/middleware/clientapproval" "github.com/chihaya/chihaya/middleware/jwt" @@ -44,12 +44,12 @@ type storageConfig struct { // Config represents the configuration used for executing Chihaya. type Config struct { middleware.Config `yaml:",inline"` - PrometheusAddr string `yaml:"prometheus_addr"` - HTTPConfig httpfrontend.Config `yaml:"http"` - UDPConfig udpfrontend.Config `yaml:"udp"` - Storage storageConfig `yaml:"storage"` - PreHooks hookConfigs `yaml:"prehooks"` - PostHooks hookConfigs `yaml:"posthooks"` + PrometheusAddr string `yaml:"prometheus_addr"` + HTTPConfig http.Config `yaml:"http"` + UDPConfig udp.Config `yaml:"udp"` + Storage storageConfig `yaml:"storage"` + PreHooks hookConfigs `yaml:"prehooks"` + PostHooks hookConfigs `yaml:"posthooks"` } // CreateHooks creates instances of Hooks for all of the PreHooks and PostHooks diff --git a/cmd/chihaya/main.go b/cmd/chihaya/main.go index 0a614ef..8290792 100644 --- a/cmd/chihaya/main.go +++ b/cmd/chihaya/main.go @@ -17,10 +17,6 @@ import ( "github.com/chihaya/chihaya/pkg/prometheus" "github.com/chihaya/chihaya/pkg/stop" "github.com/chihaya/chihaya/storage" - - // Register Storage Drivers - _ "github.com/chihaya/chihaya/storage/memory" - _ "github.com/chihaya/chihaya/storage/memorybysubnet" ) // Run represents the state of a running instance of Chihaya.