Map Operator

February 25, 2020 ยท View on GitHub

Overview

Transform the items emitted by an Observable by applying a function to each item.

Example

observable := rxgo.Just(1, 2, 3)().
	Map(func(_ context.Context, i interface{}) (interface{}, error) {
		return i.(int) * 10, nil
	})

Output:

10
20
30

Options

  • WithBufferedChannel

  • WithContext

  • WithObservationStrategy

  • WithErrorStrategy

  • WithPool

  • WithCPUPool

Serialize

Detail

  • WithPublishStrategy

Contents

  1. 1Overview
  2. 2Example
  3. 3Options
  4. 3.1Serialize