UNPKG

@smithy/types

Version:

[![NPM version](https://img.shields.io/npm/v/@smithy/types/latest.svg)](https://www.npmjs.com/package/@smithy/types) [![NPM downloads](https://img.shields.io/npm/dm/@smithy/types.svg)](https://www.npmjs.com/package/@smithy/types)

33 lines (32 loc) 772 B
/** * @public */ export interface ConnectionPool<T> { /** * Retrieve the first connection in the pool */ poll(): T | void; /** * Release the connection back to the pool making it potentially * re-usable by other requests. */ offerLast(connection: T): void; /** * Removes the connection from the pool, and destroys it. */ destroy(connection: T): void; /** * Implements the iterable protocol and allows arrays to be consumed * by most syntaxes expecting iterables, such as the spread syntax * and for...of loops */ [Symbol.iterator](): Iterator<T>; } /** * Unused. * @internal * @deprecated */ export interface CacheKey { destination: string; }