Distinct Operator

February 25, 2020 ยท View on GitHub

Overview

Suppress duplicate items emitted by an Observable.

Example

observable := rxgo.Just(1, 2, 2, 3, 4, 4, 5)().
	Distinct(func(_ context.Context, i interface{}) (interface{}, error) {
		return i, nil
	})

Output:

1
2
3
4
5

Options

  • WithBufferedChannel

  • WithContext

  • WithObservationStrategy

  • WithErrorStrategy

  • WithPool

  • WithCPUPool

Serialize

Detail

  • WithPublishStrategy

Contents

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