import "github.com/apache/beam/sdks/go/pkg/beam/core/graph/window"
Package window contains window representation, windowing strategies and utilities.
var ( // SingleGlobalWindow is a slice of a single global window. Convenience value. SingleGlobalWindow = []typex.Window{GlobalWindow{}} )
IsEqualList returns true iff the lists of windows are equal. Note that ordering matters and that this is not set equality.
type Fn struct { Kind Kind Size time.Duration // FixedWindows, SlidingWindows Period time.Duration // SlidingWindows Gap time.Duration // Sessions }
Fn defines the window fn.
NewFixedWindows returns the fixed WindowFn with the given interval.
NewGlobalWindows returns the default WindowFn, which places all elements into a single window.
NewSessions returns the session WindowFn with the given gap.
NewSlidingWindows returns the sliding WindowFn with the given period and duration.
func (w *Fn) Coder() *coder.WindowCoder
Coder returns the WindowCoder for the WindowFn.
Equals returns true iff the windows have the same kind and underlying behavior. Built-in window types (such as global window) are only equal to the same instances of the window. A user-defined window that happens to match a built-in will not match on Equals().
type GlobalWindow struct{}
GlobalWindow represents the singleton, global window.
func (GlobalWindow) Equals(o typex.Window) bool
func (GlobalWindow) MaxTimestamp() typex.EventTime
MaxTimestamp returns the maximum timestamp in the window.
func (GlobalWindow) String() string
IntervalWindow represents a half-open bounded window [start,end).
func (w IntervalWindow) Equals(o typex.Window) bool
func (w IntervalWindow) MaxTimestamp() typex.EventTime
MaxTimestamp returns the maximum timestamp in the window.
func (w IntervalWindow) String() string
Kind is the semantic type of a window fn.
const ( GlobalWindows Kind = "GLO" FixedWindows Kind = "FIX" SlidingWindows Kind = "SLI" Sessions Kind = "SES" // TODO )
WindowingStrategy defines the types of windowing used in a pipeline and contains the data to support executing a windowing strategy.
func DefaultWindowingStrategy() *WindowingStrategy
DefaultWindowingStrategy returns the default windowing strategy.
func (ws *WindowingStrategy) Equals(o *WindowingStrategy) bool
func (ws *WindowingStrategy) String() string
Package window imports 5 packages (graph) and is imported by 7 packages. Updated 2018-05-22. Refresh now. Tools for package owners.