import type { AWS } from '@jupiterone/platform-sdk-aws'; import { LoggerContext } from './../../../platform-sdk-logging'; import { NeptuneClusterInfo, PlatformNeptuneConfig } from "../config/types"; import { NeptuneConnectionProxy } from './connectionProxy'; import { GetConnectionInput, NeptuneClient, ReaderNeptuneConnection, WriterNeptuneConnection } from './types'; export declare const DEFAULT_NEPTUNE_CONFIG_PARAM_NAME = "/jupiterone/neptune/config"; export declare const DEFAULT_REFRESH_INTERVAL = 120000; export declare type ReadNeptuneConfigInput = { neptuneConfigParamName?: string; secretsManager?: AWS.SecretsManager; }; export interface AwsNeptuneClient extends NeptuneClient { clusterManager: ClusterManager; doRefresh(context: LoggerContext): Promise; checkRefresh(context: LoggerContext): Promise; } export declare function readNeptuneConfig(context: LoggerContext, options: ReadNeptuneConfigInput): Promise; declare class ManagedCluster { clusterInfo: NeptuneClusterInfo; readerConnectionProxy: NeptuneConnectionProxy; writerConnectionProxy: NeptuneConnectionProxy; connectTimeout: number; constructor(clusterManager: ClusterManager, clusterInfo: NeptuneClusterInfo); close(context: LoggerContext): void; updateConfig(context: LoggerContext, newClusterInfo: NeptuneClusterInfo): void; } declare class ClusterManager implements Omit { clusterByNameMap: Record; /** * The timeout when establishing new connection */ connectTimeout: number; /** * The name of the default current cluster (accounts that are not assigned to * a specific cluster will use the default cluster) */ defaultCurrentCluster: ManagedCluster | undefined; /** * The name of the default current cluster (accounts that are not assigned to * a specific cluster will use the default cluster) */ defaultNextCluster: ManagedCluster | undefined; /** * Timestamp when config was last updated */ lastUpdatedTimestamp: number; forceClosed: boolean; constructor(options: { connectTimeout: number; }); applyConfig(context: LoggerContext, config: PlatformNeptuneConfig): void; private getAssignedCurrentCluster; getReaderConnectionForCurrent(context: LoggerContext, options: GetConnectionInput): Promise; getReaderConnectionForNext(context: LoggerContext, options: GetConnectionInput): Promise; getWriterConnectionForCurrent(context: LoggerContext, options: GetConnectionInput): Promise; getWriterConnectionForNext(context: LoggerContext, options: GetConnectionInput): Promise; close(context: LoggerContext): void; isForceClosed(): boolean; } export declare type CreateAwsNeptuneClientInput = ReadNeptuneConfigInput & { /** * How frequently should we check for new configuration? */ refreshInterval?: number; /** * How long should we wait when connecting to Neptune? */ connectTimeout: number; }; export declare function createAwsNeptuneClient(options: CreateAwsNeptuneClientInput): AwsNeptuneClient; export {};