gostream: github.com/nmi/gostream Index | Files

package gostream

import "github.com/nmi/gostream"

Package gostream provides utility functions for channel processing

Index

Package Files

stream.go

func GenerateRandIntsStream Uses

func GenerateRandIntsStream(ctx context.Context) <-chan interface{}

GenerateRandIntsStream generates a random integer sequence infinitely.

func GenerateRepeatStream Uses

func GenerateRepeatStream(ctx context.Context, list ...interface{}) <-chan interface{}

GenerateRepeatStream generates all elemtnes of the list infinitely

func GenerateSerialIntsStream Uses

func GenerateSerialIntsStream(ctx context.Context) <-chan interface{}

GenerateSerialIntsStream produces an infinite serial integer sequence in ascending order.

func Map Uses

func Map(ctx context.Context,
    f func(args ...interface{}) interface{},
    inStreams ...<-chan interface{}) <-chan interface{}

Map first applies the function f to the first element of all input streams. Also, Map does the same for the second and subsequent elements.

func Merge Uses

func Merge(ctx context.Context, inStreams ...<-chan interface{}) <-chan interface{}

Merge combines multiple streams into one stream.

func Take Uses

func Take(ctx context.Context, inStream <-chan interface{}, num int) <-chan interface{}

Take takes the top num items from the input stream.

Package gostream imports 3 packages (graph). Updated 2019-04-19. Refresh now. Tools for package owners.