Skip to content

Commit

Permalink
remove unused alert config
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielc committed Apr 7, 2017
1 parent 91de9f0 commit 5cc47b6
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion integrations/batcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2511,7 +2511,7 @@ func testBatcher(t *testing.T, name, script string) (clock.Setter, *kapacitor.Ex
tm.HTTPDService = httpdService
tm.TaskStore = taskStore{}
tm.DeadmanService = deadman{}
as := alertservice.NewService(alertservice.NewConfig(), logService.NewLogger("[alert] ", log.LstdFlags))
as := alertservice.NewService(logService.NewLogger("[alert] ", log.LstdFlags))
as.StorageService = storagetest.New()
as.HTTPDService = httpdService
if err := as.Open(); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion integrations/streamer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9523,7 +9523,7 @@ func testStreamer(
tm.HTTPDService = httpdService
tm.TaskStore = taskStore{}
tm.DeadmanService = deadman{}
as := alertservice.NewService(alertservice.NewConfig(), logService.NewLogger("[alert] ", log.LstdFlags))
as := alertservice.NewService(logService.NewLogger("[alert] ", log.LstdFlags))
as.StorageService = storagetest.New()
as.HTTPDService = httpdService
if err := as.Open(); err != nil {
Expand Down
3 changes: 0 additions & 3 deletions server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"time"

"github.com/influxdata/kapacitor/command"
"github.com/influxdata/kapacitor/services/alert"
"github.com/influxdata/kapacitor/services/alerta"
"github.com/influxdata/kapacitor/services/config"
"github.com/influxdata/kapacitor/services/deadman"
Expand Down Expand Up @@ -53,7 +52,6 @@ type Config struct {
InfluxDB []influxdb.Config `toml:"influxdb" override:"influxdb,element-key=name"`
Logging logging.Config `toml:"logging"`
ConfigOverride config.Config `toml:"config-override"`
Alert alert.Config `toml:"alert"`

// Input services
Graphites []graphite.Config `toml:"graphite"`
Expand Down Expand Up @@ -106,7 +104,6 @@ func NewConfig() *Config {
c.Logging = logging.NewConfig()
c.Kubernetes = k8s.NewConfig()
c.ConfigOverride = config.NewConfig()
c.Alert = alert.NewConfig()

c.Collectd = collectd.NewConfig()
c.OpenTSDB = opentsdb.NewConfig()
Expand Down
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func (s *Server) appendConfigOverrideService() {

func (s *Server) initAlertService() {
l := s.LogService.NewLogger("[alert] ", log.LstdFlags)
srv := alert.NewService(s.config.Alert, l)
srv := alert.NewService(l)

srv.Commander = s.Commander
srv.HTTPDService = s.HTTPDService
Expand Down
8 changes: 0 additions & 8 deletions services/alert/config.go

This file was deleted.

2 changes: 1 addition & 1 deletion services/alert/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ type Service struct {
}
}

func NewService(c Config, l *log.Logger) *Service {
func NewService(l *log.Logger) *Service {
s := &Service{
handlers: make(map[string]map[string]handler),
closedTopics: make(map[string]bool),
Expand Down

0 comments on commit 5cc47b6

Please sign in to comment.