@ydbjs/core
Version:
Core driver for YDB: manages connections, endpoint discovery, authentication, and service client creation. Foundation for all YDB client operations.
25 lines • 890 B
TypeScript
import type { EndpointInfo as ProtoEndpointInfo } from '@ydbjs/api/discovery';
import { type Channel, type ChannelCredentials, type ChannelOptions } from 'nice-grpc';
import type { EndpointInfo } from './hooks.js';
/**
* Immutable view of a single gRPC connection.
* Pessimization state is owned by the Pool — not here.
*/
export interface Connection extends Disposable {
readonly endpoint: EndpointInfo;
readonly channel: Channel;
close(): void;
[Symbol.dispose](): void;
}
/**
* A single gRPC connection to a YDB node.
*/
export declare class GrpcConnection implements Connection {
#private;
readonly endpoint: EndpointInfo;
constructor(endpoint: ProtoEndpointInfo, channelCredentials: ChannelCredentials, channelOptions?: ChannelOptions);
get channel(): Channel;
close(): void;
[Symbol.dispose](): void;
}
//# sourceMappingURL=conn.d.ts.map