{"repo":"devnw/stream","free":true,"listed":false,"github":"https://github.com/devnw/stream","clone":"git clone https://github.com/devnw/stream.git","description":"stream is a concurrency pattern implementation using Go generics. a.k.a. my accidentally awesome library","language":"Go","stars":67,"topics":["golang","concurrency","go","stream-processing","concurrency-patterns","generics","templates","generic-programming"],"license":"Apache-2.0","category":"data-pipelines","readme_excerpt":"stream -- import \".\" Package stream provides a set of generic functions for working concurrent design patterns in Go. Installation To install the package, run: go get -u go.atomizer.io/stream@latest Usage import \"go.atomizer.io/stream\" Benchmarks To execute the benchmarks, run the following command: go test -bench=. ./... To view benchmarks over time for the main branch of the repository they can be seen on our [Benchmark Report Card]. [Benchmark Report Card]: https://devnw.github.io/stream/dev/bench/ Usage MinLife is the minimum life time for the scaler. This is used to prevent the scaler from exiting too quickly, and causing too small of a lifetime. MinWait is the absolute minimum wait time for the ticker. This is used to prevent the ticker from firing too often and causing too small of a wait time. func Any Any accepts an incoming data channel and converts the channel to a readonly channel of the any type. func Distribute Distribute accepts an incoming data channel and distributes the data among the supplied outgoing data channels using a dynamic select statement. NOTE: Execute the Distribute function in a goroutine if parallel execution is desired. Canceling the context or closing the incoming channel is important to ensure that the goroutine is properly terminated. func Drain Drain accepts a channel and drains the channel until the channel is closed or the context is canceled. func FanIn FanIn accepts incoming data channels and forwards returns a single channel that rece","default_branch":null,"files":null,"tree":[],"storefront":"/r/devnw","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/devnw/stream/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}