import type { CallOptionsFactory } from '../base/options'; import type { ClientOptions } from './driver-mgr'; import type { SqliteCient } from './sqlite'; import type { grpc } from '../../deps/grpc'; export default interface IDriver { readonly callOptionsFactory?: CallOptionsFactory; init: (options: ClientOptions) => Promise; exec: (service: any, method: string, params: unknown, options?: any) => Promise; withConnection: (service: any, fn: (args: { resource: any; client: grpc.Client | SqliteCient; }) => Promise | R) => Promise; markFailed: (resource: any, error: Error) => void; close: () => void; }