UNPKG

lambda-remote-context

Version:

Lifecycle management (RemoteContext) and wrapping (RemoteClient) for third party adapters

21 lines (20 loc) 545 B
import { RemoteClientLifecycle } from './RemoteClientLifecycle.js'; export default abstract class RemoteClient<T> { private lifecycle; private client?; constructor(lifecycle: RemoteClientLifecycle<T>); /** * Initialize the client */ initializeClient(): Promise<void>; /** * Get client * @returns An instance of the client * @throws Error if the client was not initialized. */ getClient(): T; /** * Cleanup any resources, connections, etc */ cleanUp(): Promise<void>; }