Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Latest commit

 

History

History
62 lines (49 loc) · 4.37 KB

cp.rx.go.Retry.md

File metadata and controls

62 lines (49 loc) · 4.37 KB

docs » 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

Signature cp.rx.go.Retry.DelayedBy <cp.rx.go.Statement.Modifier>
Type Constant
Description A Statement.Modifier that sets the delay between retries.
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.

Constructors

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.

Methods

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.
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.