channels

package
v0.7.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 1 Imported by: 1

Documentation

Overview

A package channels is a package that contains the channels implementation of the application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Broadcast

func Broadcast[T any](input <-chan T, outputs ...chan<- T)

Broadcast broadcasts a channel to multiple channels.

func Channel added in v0.7.1

func Channel[T any](source []T, in chan any)

Channel is a helper function to send a slice to a channel.

func Drain

func Drain[T any](input <-chan T)

Drain drains the channel until it is closed.

func Filter

func Filter[T any](input <-chan T, fn func(T) bool) <-chan T

Filter filters the channel with the given function.

func Join

func Join[T any](inputs ...<-chan T) <-chan T

Join joins multiple channels into one.

func Merge

func Merge[T any](inputs ...<-chan T) <-chan T

Merge merges multiple channels into one.

func Slice added in v0.7.1

func Slice[T any](ch <-chan any) []T

Slice slices the channel into a slice.

func Wrap added in v0.7.3

func Wrap[T any](ch chan any) chan T

Wrap wraps a channel into a typed channel.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL