Skip to content

Latest commit

 

History

History
38 lines (23 loc) · 870 Bytes

fromeventsource.md

File metadata and controls

38 lines (23 loc) · 870 Bytes

FromEventSource Operator

Overview

Create a hot observable from a channel.

The items are consumed as soon as the observable is created. An Observer will see only the items since the moment he subscribed to the Observable.

Example

ch := make(chan rxgo.Item)
observable := rxgo.FromEventSource(ch)

Options

  • WithBackPressureStrategy

    • Block (default): block until the Observer is ready to consume the next item.
rxgo.FromEventSource(ch, rxgo.WithBackPressureStrategy(rxgo.Block))
* Drop: drop the item if the Observer isn't ready.
rxgo.FromEventSource(ch, rxgo.WithBackPressureStrategy(rxgo.Drop))