cmd/chihaya: remove extra registration of storages

This commit is contained in:
Jimmy Zelinskie 2017-06-04 14:34:31 -04:00
parent c41519e73f
commit effb05103a
2 changed files with 8 additions and 12 deletions

View file

@ -7,8 +7,8 @@ import (
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
httpfrontend "github.com/chihaya/chihaya/frontend/http" "github.com/chihaya/chihaya/frontend/http"
udpfrontend "github.com/chihaya/chihaya/frontend/udp" "github.com/chihaya/chihaya/frontend/udp"
"github.com/chihaya/chihaya/middleware" "github.com/chihaya/chihaya/middleware"
"github.com/chihaya/chihaya/middleware/clientapproval" "github.com/chihaya/chihaya/middleware/clientapproval"
"github.com/chihaya/chihaya/middleware/jwt" "github.com/chihaya/chihaya/middleware/jwt"
@ -44,12 +44,12 @@ type storageConfig struct {
// Config represents the configuration used for executing Chihaya. // Config represents the configuration used for executing Chihaya.
type Config struct { type Config struct {
middleware.Config `yaml:",inline"` middleware.Config `yaml:",inline"`
PrometheusAddr string `yaml:"prometheus_addr"` PrometheusAddr string `yaml:"prometheus_addr"`
HTTPConfig httpfrontend.Config `yaml:"http"` HTTPConfig http.Config `yaml:"http"`
UDPConfig udpfrontend.Config `yaml:"udp"` UDPConfig udp.Config `yaml:"udp"`
Storage storageConfig `yaml:"storage"` Storage storageConfig `yaml:"storage"`
PreHooks hookConfigs `yaml:"prehooks"` PreHooks hookConfigs `yaml:"prehooks"`
PostHooks hookConfigs `yaml:"posthooks"` PostHooks hookConfigs `yaml:"posthooks"`
} }
// CreateHooks creates instances of Hooks for all of the PreHooks and PostHooks // CreateHooks creates instances of Hooks for all of the PreHooks and PostHooks

View file

@ -17,10 +17,6 @@ import (
"github.com/chihaya/chihaya/pkg/prometheus" "github.com/chihaya/chihaya/pkg/prometheus"
"github.com/chihaya/chihaya/pkg/stop" "github.com/chihaya/chihaya/pkg/stop"
"github.com/chihaya/chihaya/storage" "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. // Run represents the state of a running instance of Chihaya.