stream

package
v0.0.0-...-db9179b Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package stream is data stream ETL

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stream

type Stream[T comparable] chan T

func Connect

func Connect[T comparable](arr []T, arrs ...[]T) Stream[T]

Connect Multiple slice splicing

func New

func New[T comparable](arr []T) Stream[T]

New slice to stream

func Of

func Of[T comparable](obj ...T) Stream[T]

Of element to stream

func (Stream[T]) Distinct

func (s Stream[T]) Distinct() Stream[T]

Distinct 去重

func (Stream[T]) Each

func (s Stream[T]) Each(fn func(i int, o T))

Each for every element

func (Stream[T]) Filter

func (s Stream[T]) Filter(fn func(o T) bool) Stream[T]

Filter 过滤

func (Stream[T]) Limit

func (s Stream[T]) Limit(n uint) Stream[T]

func (Stream[T]) List

func (s Stream[T]) List() (arr []T)

List stream to slice

func (Stream[T]) Reverse

func (s Stream[T]) Reverse() Stream[T]

Reverse 数据反转

func (Stream[T]) Skip

func (s Stream[T]) Skip(n uint) Stream[T]

Jump to

Keyboard shortcuts

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