Documentation ¶
Overview ¶
Package fixed implements Fixed windows. Fixed windows (sometimes called tumbling windows) are defined by a static window size, e.g. minutely windows or hourly windows. They are generally aligned, i.e. every window applies across all the data for the corresponding period of time. Package fixed also maintains the state of active keyed windows in a vertex. Keyed Window maintains the association between set of keys and an interval window. keyed also provides the lifecycle management of an interval window. Watermark is used to trigger the expiration of windows.
Index ¶
- func NewFixed(length time.Duration) window.Windower
- type Fixed
- func (f *Fixed) AssignWindow(eventTime time.Time) []window.AlignedKeyedWindower
- func (f *Fixed) CreateWindow(kw window.AlignedKeyedWindower) window.AlignedKeyedWindower
- func (f *Fixed) GetWindow(kw window.AlignedKeyedWindower) window.AlignedKeyedWindower
- func (f *Fixed) RemoveWindows(wm time.Time) []window.AlignedKeyedWindower
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fixed ¶
type Fixed struct { // Length is the temporal length of the window. Length time.Duration // contains filtered or unexported fields }
Fixed implements Fixed window. Fixed maintains the state of active windows All the operations in Fixed (see window.Windower) order the entries in the ascending order of start time. So the earliest window is at the front and the oldest window is at the end.
func (*Fixed) AssignWindow ¶
func (f *Fixed) AssignWindow(eventTime time.Time) []window.AlignedKeyedWindower
AssignWindow assigns a window for the given eventTime.
func (*Fixed) CreateWindow ¶ added in v0.6.3
func (f *Fixed) CreateWindow(kw window.AlignedKeyedWindower) window.AlignedKeyedWindower
CreateWindow adds a window for a given interval window
func (*Fixed) GetWindow ¶ added in v0.6.3
func (f *Fixed) GetWindow(kw window.AlignedKeyedWindower) window.AlignedKeyedWindower
GetWindow returns an existing window for the given interval
func (*Fixed) RemoveWindows ¶ added in v0.6.3
func (f *Fixed) RemoveWindows(wm time.Time) []window.AlignedKeyedWindower
RemoveWindows returns an array of keyed windows that are before the current watermark. So these windows can be closed.