Skip to content

Instantly share code, notes, and snippets.

@kell18
Created November 19, 2018 13:10
Show Gist options
  • Select an option

  • Save kell18/c24a57cce651c9167ae56d35d9e2b615 to your computer and use it in GitHub Desktop.

Select an option

Save kell18/c24a57cce651c9167ae56d35d9e2b615 to your computer and use it in GitHub Desktop.
trait StreamAlg[S[_], KeyedS[_], InEvent] {
def createStream: S[InEvent]
def keyBy[E](stream: S[E]): KeyedS[E]
def flatMapWithState[InE, OutE, State](stream: S[InE])(f: (InE, State) => Seq[OutE]): S[OutE]
def mapWithState[InE, OutE, State](stream: S[InE])(f: (InE, State) => Seq[OutE]): S[OutE]
def flatMapAllWithState[InE, OutE, State](stream: S[InE])(mappers: (InE, State) => Seq[OutE]): S[OutE]
def uniteNearby[Event: Semigroup: TimeExtractor](stream: S[Event], keys: Seq[Symbol]): S[Event]
def save: S[Unit]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment