import { DataSource, DeepPartial } from 'typeorm';
import { ShardingBaseEntity } from './sharding-base-entity';
import { ShardingDataSourceOptions } from './types/typeorm-sharding.type';
export declare class ShardingManager {
    readonly options: ShardingDataSourceOptions;
    readonly dataSources: DataSource[];
    private _destroyed;
    get destroyed(): boolean;
    protected constructor(options: ShardingDataSourceOptions);
    static createInstance(options: ShardingDataSourceOptions): Promise<ShardingManager>;
    protected init(): Promise<this>;
    static init(options: ShardingDataSourceOptions): Promise<ShardingManager>;
    getDataSource(entity: DeepPartial<ShardingBaseEntity>, shardingFunc: Function): DataSource;
    getDataSourceById(id: unknown, shardingFuncById: Function): DataSource;
    getDataSourceByShardingKey(key: string): DataSource;
    destroy(): Promise<void>;
}
