Switch plugin API to use an accumulator

This commit is contained in:
Evan Phoenix
2015-04-06 09:32:10 -07:00
parent f9250e8e39
commit d1cc82653a
12 changed files with 295 additions and 184 deletions

View File

@@ -1,9 +1,11 @@
package plugins
import "github.com/vektra/cypress"
type Accumulator interface {
Add(name string, value interface{}, tags map[string]string)
}
type Plugin interface {
Read() ([]*cypress.Message, error)
Gather(Accumulator) error
}
type Creator func() Plugin