Remove final cypress remnents
This commit is contained in:
parent
609cba2cd5
commit
8df5d57f6d
13
agent.go
13
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
|
||||
|
|
|
@ -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
|
||||
}
|
|
@ -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
|
||||
}
|
Loading…
Reference in New Issue