File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ go-stream
2
+ =========
3
+
4
+ This library is a framework for stream processing analysis.
5
+
6
+ It is made up of a graph connecting a source to 1 or more operators, terminating at a sink.
7
+ Operators pass data from one to another with go channels. An example graph is:
8
+
9
+ input := make(chan stream.Object)
10
+
11
+ passthruFn := func(in int) []int {
12
+ return []int{in}
13
+ }
14
+
15
+ FirstOp := mapper.NewOp(passthruFn, "First PT no")
16
+ FirstOp.SetIn(input)
17
+ SecondOp := mapper.NewOp(passthruFn, "2nd PT no")
18
+
19
+ ch := stream.NewChain()
20
+ ch.Add(FirstOp)
21
+ ch.Add(SecondOp)
22
+
23
+ ch.Start()
24
+
25
+ Now any data sent through the input channel will be processed by the library.
26
+
27
+ Compiling:
28
+ go build
29
+
30
+ Testing:
31
+ go test
You can’t perform that action at this time.
0 commit comments