Just Operator

February 25, 2020 ยท View on GitHub

Overview

Convert an object or a set of objects into an Observable that emits that or those objects.

Examples

Single Item

observable := rxgo.Just(1)()

Output:

1

Multiple Items

observable := rxgo.Just(1, 2, 3)()

Output:

1
2
3

Channel

externalCh := make(chan int)
observable := rxgo.Just(externalCh)()

Options

  • WithBufferedChannel

  • WithPublishStrategy

Contents

  1. 1Overview
  2. 2Examples
  3. 2.1Single Item
  4. 2.2Multiple Items
  5. 2.3Channel
  6. 3Options