import { ChronicleOptions } from './ChronicleOptions.js'; import { EventStoreName } from './EventStoreName.js'; import { EventStoreNamespaceName } from './EventStoreNamespaceName.js'; import { IChronicleClient } from './IChronicleClient.js'; import { IEventStore } from './IEventStore.js'; /** * Implements {@link IChronicleClient} by managing a gRPC connection to the * Chronicle Kernel via {@link ChronicleConnection}. * * Create a client by providing {@link ChronicleOptions} configured with a connection string: * * ```typescript * const client = new ChronicleClient(ChronicleOptions.fromConnectionString('chronicle://localhost:35000')); * const store = await client.getEventStore('MyStore'); * await store.eventLog.append('my-entity-id', new MyEvent('data')); * client.dispose(); * ``` */ export declare class ChronicleClient implements IChronicleClient { readonly options: ChronicleOptions; private static readonly _healthCheckIntervalMs; private static readonly _maxBackoffMs; private readonly _connection; private readonly _stores; private readonly _lifecycle; private readonly _logger; private _watchdogHandle?; private _connectOperation?; private _reconnectOperation?; private _discoveryOperation?; private _isDisposed; private _keepAliveAbortController?; private _healthCheckInFlight; private _connectionFailure?; private _consecutiveCredentialRejections; /** * Creates a new {@link ChronicleClient} using the provided options. * @param options - The options to configure the client, including the connection string. */ constructor(options: ChronicleOptions); /** @inheritdoc */ getEventStore(name: string | EventStoreName, namespace?: string | EventStoreNamespaceName): Promise; private toNamespaceName; private getOrCreateEventStore; /** @inheritdoc */ getEventStores(): Promise; /** @inheritdoc */ dispose(): void; private connectWithRetry; private ensureConnected; private reconnect; private recoverConnection; private reconnectWithRetry; /** * Waits out the exponential backoff for a failed attempt and reports why. * The delay is jittered so a fleet of clients that lost the same kernel does * not come back in lockstep and knock it over again. */ private backOff; private withReconnect; private terminalConnectionError; private hasOAuthCredentialRejection; private shouldReconnect; private isRejectedAuthentication; private mentionsConnectionProblem; private toErrorMessage; private startConnectionWatchdog; private get cannotRunHealthCheck(); private runHealthCheck; private startKernelKeepAlive; private failConnection; private backgroundConnectionFailed; private registerArtifactsForStore; } //# sourceMappingURL=ChronicleClient.d.ts.map