// Example Usage
type LineReader struct {
lines []string
}
func (l LineReader) ProcessData(
msg firestorm.Message,
outChan chan firestorm.Message,
errChan chan error,
) {
for _, line := range l.lines {
var msg firestorm.Message
msg = []byte(line)
outChan <- msg
}
}
type LineParser struct {
}
func (l LineParser) ProcessData(
msg firestorm.Message,
outChan chan firestorm.Message,
errChan chan error,
) {
newMsg := strings.ToUpper(string(msg))
outChan <- []byte(newMsg)
}
type LineOutput struct {
}
func (l LineOutput) ProcessData(
msg firestorm.Message,
outChan chan firestorm.Message,
errChan chan error,
) {
log.Println("load:", string(msg))
}
func main() {
extract := LineReader{}
extract.lines = []string{"save", "our", "souls"}
transform := LineParser{}
load := LineOutput{}
pl := firestorm.NewPipeline(extract, transform, load)
pl.Run()
}
-
Notifications
You must be signed in to change notification settings - Fork 0
arriqaaq/firestorm
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Linux pipe like concept implementation in go
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published