couchbase-index-manager
Version:
Manage Couchbase indexes during the CI/CD process
50 lines (49 loc) • 1.27 kB
TypeScript
import { IndexManager } from '../index-manager';
import { IndexMutation } from './index-mutation';
import { Logger } from '../options';
export interface PlanOptions {
/**
* logger for output
*/
logger: Logger;
/**
* Milliseconds to wait for indexes to build
*/
buildTimeout?: number;
/**
* Milliseconds to wait before building indexes
*/
buildDelay: number;
}
/**
* Represents a planned set of mutations for synchronization
*/
export declare class Plan {
private manager;
private options;
private mutations;
constructor(manager: IndexManager, mutations: IndexMutation[], options?: Partial<PlanOptions>);
/**
* Returns true if the plan is empty
*/
isEmpty(): boolean;
/**
* Prints the plan
*/
print(): void;
/**
* Executes the plan
*/
execute(): Promise<void>;
/**
* Adds mutations to the plan
*/
addMutation(...mutations: IndexMutation[]): void;
private buildIndexes;
/**
* When running in Kubernetes and attaching to logs, there is a five
* minute timeout if there is no console output. This tick handler
* ensures that output continues during that time.
*/
private indexBuildTickHandler;
}