-
Notifications
You must be signed in to change notification settings - Fork 111
/
library.go
63 lines (58 loc) · 1.69 KB
/
library.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// +build !arm
package library
import (
"github.com/nytlabs/streamtools/st/blocks"
)
var Blocks = map[string]func() blocks.BlockInterface{
"count": NewCount,
"toggle": NewToggle,
"movingaverage": NewMovingAverage,
"ticker": NewTicker,
"fromnsq": NewFromNSQ,
"fromhttpstream": NewFromHTTPStream,
"fromsqs": NewFromSQS,
"frompost": NewFromPost,
"fromfile": NewFromFile,
"fromemail": NewFromEmail,
"tonsq": NewToNSQ,
"toelasticsearch": NewToElasticsearch,
"toemail": NewToEmail,
"tofile": NewToFile,
"tolog": NewToLog,
"tobeanstalkd": NewToBeanstalkd,
"tomongodb": NewToMongoDB,
"mask": NewMask,
"filter": NewFilter,
"sync": NewSync,
"queue": NewQueue,
"unpack": NewUnpack,
"pack": NewPack,
"parsexml": NewParseXML,
"set": NewSet,
"cache": NewCache,
"join": NewJoin,
"kullbackleibler": NewKullbackLeibler,
"learn": NewLearn,
"logisticModel": NewLogisticModel,
"linearModel": NewLinearModel,
"gethttp": NewGetHTTP,
"gaussian": NewGaussian,
"zipf": NewZipf,
"poisson": NewPoisson,
"map": NewMap,
"histogram": NewHistogram,
"timeseries": NewTimeseries,
"fromwebsocket": NewFromWebsocket,
"tonsqmulti": NewToNSQMulti,
"fromudp": NewFromUDP,
"dedupe": NewDeDupe,
}
var BlockDefs = map[string]*blocks.BlockDef{}
func Start() {
for k, newBlock := range Blocks {
b := newBlock()
b.Build(blocks.BlockChans{nil, nil, nil, nil, nil, nil})
b.Setup()
BlockDefs[k] = b.GetDef()
}
}