Documentation
¶
Overview ¶
Deprecated: chansort has now moved to github.com/jamesrom/order/chansort
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SortOrderable ¶
func SortOrderable[T constraints.Ordered](in <-chan T, window time.Duration) <-chan T
SortOrderable sorts channel messages in ascending order. Messages received inside the sliding-window buffer defined by _window_ are sent to the output channel in ascending order. That is to say: a message received at time _Z_ from the output channel is guaranteed to be the smallest message since _Z − window_.
func SortWithComparator ¶
SortWithComparator sorts channel messages in the order defined by the given comparator function. Messages received inside the sliding-window buffer defined by _window_ are sent to the output channel in order. That is to say: a message received at time _Z_ from the output channel is guaranteed to be the smallest message since _Z − window_.