@databricks/sql
Version:
Driver for connection to Databricks SQL via Thrift API.
12 lines (11 loc) • 337 B
TypeScript
export type ShouldRetryResult = {
shouldRetry: false;
} | {
shouldRetry: true;
retryAfter: number;
};
export type RetryableOperation<R> = () => Promise<R>;
export default interface IRetryPolicy<R> {
shouldRetry(details: R): Promise<ShouldRetryResult>;
invokeWithRetry(operation: RetryableOperation<R>): Promise<R>;
}