Timestamp Operator

November 3, 2020 ยท View on GitHub

Overview

Attach a timestamp to each item emitted by an Observable.

Example

observe := rxgo.Just(1, 2, 3)().Timestamp().Observe()
var timestampItem rxgo.TimestampItem
timestampItem = (<-observe).V.(rxgo.TimestampItem)
fmt.Println(timestampItem)

Output:

{2020-02-23 15:26:02.231197 +0000 UTC 1}

Options

  • WithBufferedChannel

  • WithContext

  • WithObservationStrategy

  • WithErrorStrategy

  • WithPublishStrategy

Contents

  1. 1Overview
  2. 2Example
  3. 3Options