diff --git a/agent.go b/agent.go index 533cf7593..6fe65a638 100644 --- a/agent.go +++ b/agent.go @@ -4,16 +4,11 @@ import ( "log" "net/url" "sort" + "time" "github.com/influxdb/influxdb/client" "github.com/influxdb/tivan/plugins" - "github.com/vektra/cypress" ) -import "time" - -type Metrics interface { - Receive(*cypress.Message) error -} type Agent struct { Interval Duration @@ -25,8 +20,6 @@ type Agent struct { plugins []plugins.Plugin conn *client.Client - - eachInternal []func() } func NewAgent(config *Config) (*Agent, error) { @@ -121,10 +114,6 @@ func (a *Agent) Run(shutdown chan struct{}) { log.Printf("Error in plugins: %s", err) } - for _, f := range a.eachInternal { - f() - } - select { case <-shutdown: return diff --git a/cmd/influxdb-agent/agent.go b/cmd/tivan/tivan.go similarity index 100% rename from cmd/influxdb-agent/agent.go rename to cmd/tivan/tivan.go diff --git a/mock_Metrics.go b/mock_Metrics.go deleted file mode 100644 index d3249cd07..000000000 --- a/mock_Metrics.go +++ /dev/null @@ -1,17 +0,0 @@ -package tivan - -import "github.com/stretchr/testify/mock" - -import "github.com/vektra/cypress" - -type MockMetrics struct { - mock.Mock -} - -func (m *MockMetrics) Receive(_a0 *cypress.Message) error { - ret := m.Called(_a0) - - r0 := ret.Error(0) - - return r0 -} diff --git a/mock_Plugin.go b/mock_Plugin.go deleted file mode 100644 index f2f36980c..000000000 --- a/mock_Plugin.go +++ /dev/null @@ -1,18 +0,0 @@ -package tivan - -import "github.com/stretchr/testify/mock" - -import "github.com/vektra/cypress" - -type MockPlugin struct { - mock.Mock -} - -func (m *MockPlugin) Read() ([]*cypress.Message, error) { - ret := m.Called() - - r0 := ret.Get(0).([]*cypress.Message) - r1 := ret.Error(1) - - return r0, r1 -}