Skip to content

Commit 49c8953

Browse files
committed
Create README.md
Initial example, more to follow
1 parent 0d0a331 commit 49c8953

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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

0 commit comments

Comments
 (0)