forked from banyanops/collector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwriter.go
26 lines (21 loc) · 811 Bytes
/
writer.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package collector
import (
//config "github.com/banyanops/collector/config"
//blog "github.com/ccpaging/log4go"
//"strings"
)
// This is a writer plugin interface. Currently supported plugins are:
// "fileWriter": writes to a file in desired format, and
// "banyanWriter": invokes banyan API to send data to SAAS dashboard
type Writer interface {
// Write output obtained by all the scripts to the appropriate writer plugin
// Note: outMapMap maps: ImageID -> Script -> Output
WriteImageAllData(outMapMap map[string]map[string]interface{})
// Append Image metadata to the appropriate writer plugin
AppendImageMetadata(imageMetadata []ImageMetadataInfo)
// Remoe Image metadta from the appropriate writer plugin
RemoveImageMetadata(imageMetadata []ImageMetadataInfo)
}
var (
WriterList []Writer
)