chanx

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Insert

func Insert[T any](ch chan<- T, value T) bool

Types

type Stream

type Stream[T any] struct {
	// contains filtered or unexported fields
}

func New

func New[T any](count int, consumer func(ctx context.Context, channel chan T) error) *Stream[T]

func NewWithBuffer

func NewWithBuffer[T any](count, buffer int, consumer func(ctx context.Context, channel chan T) error) *Stream[T]

func (*Stream[T]) Close

func (v *Stream[T]) Close()

func (*Stream[T]) Push

func (v *Stream[T]) Push(item T) bool

func (*Stream[T]) StartSteaming

func (v *Stream[T]) StartSteaming(ctx context.Context) error

Jump to

Keyboard shortcuts

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