Skip to content

Data stream core components

Choose a tag to compare

@arielf-camacho arielf-camacho released this 15 Oct 13:57
c34c2db

Added

  • Initial core components:
    • Sources:
      • SingleSource: Emits a single value from a function
      • SliceSource: Emits all values from a slice
    • Flows:
      • FilterFlow: Filters values based on a predicate function
      • MapFlow: Transforms values using a function with optional parallelism
      • MergeFlow: Merges multiple streams into a single output stream
      • SplitFlow: Splits a stream into two based on a predicate
      • SpreadFlow: Duplicates a stream to multiple outputs
      • PassThroughFlow: Passes values through with optional type conversion
    • Sinks:
      • ChannelSink: Writes values to a Go channel
      • WriterSink: Writes byte data to an io.Writer
  • Core primitives:
    • Source[T]: Interface for data sources
    • Flow[IN, OUT]: Interface for data transformations
    • Sink[T]: Interface for data consumers
    • Inlet[T] and Outlet[T]: Base interfaces for channel communication
  • Builder pattern: Fluent API for configuring all components
  • Context support: All components respect Go's context for cancellation
  • Error handling: Customizable error handlers for robust applications
  • Type safety: Full generic support with compile-time type checking
  • Concurrency: Built-in support for parallel processing where appropriate
  • Resource management: Automatic channel lifecycle management
  • Examples: Complete working examples for all components
  • Documentation: Comprehensive documentation with usage examples
  • Testing: Full test coverage for all components
  • Makefile: Development tools and commands for contributors