gleam

package module
v0.0.0-...-74d05c2 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: MIT Imports: 2 Imported by: 0

README

Gleam

A type-safe wrapper for the Apache Beam Go SDK

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DoFn

type DoFn[T, E any] interface {
	ProcessElement(context.Context, T, func(E))
}

type KV

type KV[K any, V any] struct {
	Key K
	Val V
}

type PCollection

type PCollection[T any] struct {
	Col beam.PCollection
}

func Create

func Create[T any](s beam.Scope, values ...T) PCollection[T]

func CreateList

func CreateList[T any](s beam.Scope, values []T) PCollection[T]

func DropKey

func DropKey[A, B any](s beam.Scope, c PCollection[KV[A, B]]) PCollection[B]

func DropValue

func DropValue[A, B any](s beam.Scope, c PCollection[KV[A, B]]) PCollection[A]

func Emit

func Emit[T, E any](s beam.Scope, fn func(T, func(E)), c PCollection[T]) PCollection[E]

func Explode

func Explode[T any](s beam.Scope, c PCollection[[]T]) PCollection[T]

func Flatten

func Flatten[T any](s beam.Scope, cols ...PCollection[T]) PCollection[T]

func Impulse

func Impulse(s beam.Scope) PCollection[[]byte]

func ImpulseValue

func ImpulseValue(s beam.Scope, v []byte) PCollection[[]byte]

func ParDo

func ParDo[T, E any](s beam.Scope, fn func(T) E, c PCollection[T]) PCollection[E]

func ParDoFn

func ParDoFn[T, E any](s beam.Scope, fn DoFn[T, E], c PCollection[T]) PCollection[E]

func ParDoPerKey

func ParDoPerKey[K, V, E any](s beam.Scope, fn func(K, V) E, c PCollection[KV[K, V]]) PCollection[E]

func Partition

func Partition[T any](s beam.Scope, n int, fn func(T) int, c PCollection[T]) []PCollection[T]

func Reshuffle

func Reshuffle[T any](s beam.Scope, c PCollection[T]) PCollection[T]

func SwapKV

func SwapKV[A, B any](s beam.Scope, c PCollection[KV[A, B]]) PCollection[KV[B, A]]

Directories

Path Synopsis
examples
minimal_wordcount
minimal_wordcount is an example that counts words in King Lear, by William Shakespeare.
minimal_wordcount is an example that counts words in King Lear, by William Shakespeare.
wordcount
wordcount is an example that counts words in Shakespeare and includes Beam best practices.
wordcount is an example that counts words in Shakespeare and includes Beam best practices.
io
transforms
top
x

Jump to

Keyboard shortcuts

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