API Reference

cockatiel

Resilience and transient-fault-handling library with retry, circuit breaker, timeout, bulkhead, and fallback policies.

Official Documentation ↗
CompatibilityThis documentation covers version v4.0.0. Check the official docs for the latest API surface.

Installation

npmnpm install cockatiel

Methods

cockatiel is resilience and transient-fault-handling library with retry, circuit breaker, timeout, bulkhead, and fallback policies. This page documents the core methods, installation, and common usage patterns for the current stable release.

Installation

Install cockatiel with your preferred package manager using the command shown in the frontmatter. The package is published to the npm registry and ships with TypeScript types where applicable.

Core methods

The methods listed in the frontmatter cover the primary API surface. Each signature reflects the v3.2 release. Consult the official documentation linked in sourceUrl for advanced options, edge cases, and breaking changes between major versions.

Frequently asked questions

The faq section in the frontmatter answers the most common questions about cockatiel, including comparisons with alternatives, configuration tips, and runtime requirements. If your question is not covered, check the source URL for the full guide.

FAQ

Can I compose policies?
Yes. Use retryPolicy.wrap(breaker).wrap(timeout) to layer them; execution order follows the wrap chain.
Does it support backoff?
Yes. Use ExponentialBackoff, ConstantBackoff, or DelegateBackoff in retry options.
Is it framework-agnostic?
Yes. It is a pure TS library; wrap any async function.