# cp.rx.go.Retry

Extends: Statement

A Statement that will retry the contained statement if there is an error. It can be limited to a set number of retries, and have a delay added between retries.


# API Overview

Constants - Useful values which cannot be changed

  • DelayedBy
  • UpTo

Constructors - API calls which return an object, typically one that offers API methods

  • Retry

Methods - API calls which can only be made on an object returned by a constructor

  • DelayedBy
  • UpTo

# API Documentation

# Constants

# DelayedBy

Signature cp.rx.go.Retry.DelayedBy <cp.rx.go.Statement.Modifier>
Type Constant
Description A Statement.Modifier that sets the delay between retries.
Notes None
Source src/extensions/cp/rx/go/Retry.lua line 62

# UpTo

Signature cp.rx.go.Retry.UpTo <cp.rx.go.Statement.Modifier>
Type Constant
Description A Statement.Modifier that sets the number of times to retry.
Notes None
Source src/extensions/cp/rx/go/Retry.lua line 43

# Constructors

# Retry

Signature cp.rx.go.Retry(resolvable) -> Retry
Type Constructor
Description Creates a new Retry Statement that will retry the resolveable if it emits an error.
Parameters
  • resolvable - a resolvable value, which will be retried if it sends an error signal.
Returns
  • The Statement.
Notes
  • Example:
  • lua</li><li>Retry(someObservable)</li><li>
Examples None
Source src/extensions/cp/rx/go/Retry.lua line 12

# Methods

# DelayedBy

Signature cp.rx.go.Retry:DelayedBy(milliseconds[, scheduler]) -> Retry.DelayedBy
Type Method
Description Specify a time in millieconds to delay by.
Parameters
  • milliseconds - The amount of time do delay between retries.
  • scheduler - The scheduler to use. Defaults to cp.rx.util.defaultScheduler().
Returns
  • The DelayedBy Statement.Modifier.
Notes None
Examples None
Source src/extensions/cp/rx/go/Retry.lua line 66

# UpTo

Signature cp.rx.go.Retry:UpTo(count) -> Retry.UpTo
Type Method
Description Specifies the number of times to retry up to.
Parameters
  • count - The number of times to retry.
Returns
  • The UpTo Statement.Modifier.
Notes None
Examples None
Source src/extensions/cp/rx/go/Retry.lua line 47