-
Notifications
You must be signed in to change notification settings - Fork 5
/
null.go
41 lines (30 loc) · 868 Bytes
/
null.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package null
import (
"fmt"
"os"
"github.com/CN-TU/go-flows/flows"
"github.com/CN-TU/go-flows/util"
)
type nullExporter struct {
}
func (pe *nullExporter) Fields(fields []string) {}
//Export export given features
func (pe *nullExporter) Export(template flows.Template, features []interface{}, when flows.DateTimeNanoseconds) {
}
//Finish Write outstanding data and wait for completion
func (pe *nullExporter) Finish() {}
func (pe *nullExporter) ID() string { return "null" }
func (pe *nullExporter) Init() {}
func newNullExporter(args []string) (arguments []string, ret util.Module, err error) {
arguments = args
ret = &nullExporter{}
return
}
func nullHelp(name string) {
fmt.Fprintf(os.Stderr, `
The %s exporter does not write out anything.
`, name)
}
func init() {
flows.RegisterExporter("null", "Exports nothing.", newNullExporter, nullHelp)
}