Skip to content

itsubaki/gostream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

237 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gostream

PkgGoDev Go Report Card tests

Stream processing library in Go.

TODO

  • Window
    • LengthWindow
    • LengthBatchWindow
    • TimeWindow
    • TimeBatchWindow
  • Select
  • Where
    • Equals, NotEquals
    • Larger, Less
    • AND, OR
  • OrderBy
  • Limit, Offset
  • Aggregate Function
    • Avg, Sum, Count
    • Max, Min

Example

type LogEvent struct {
	Time    time.Time
	Level   int
	Message string
}

q := "select * from LogEvent.length(10)"
s, err := gostream.New().
	Add(LogEvent{}).
	Query(q)
if err != nil {
	panic(err)
}
defer s.Close()

go func() {
	for {
		fmt.Printf("%v\n", <-s.Output())
	}
}()

s.Input() <- LogEvent{
	Time: time.Now()
	Level: 1
	Message: "something happened"
}

About

Stream processing library in Go

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors