///
///
import * as Koa from 'koa';
import { CrawlerOption } from './crawler/CrawlerOption';
export declare type CendertronConfig = {
parallelNum: 1;
};
/**
* Cendertron rendering service. This runs the server which routes rendering
* requests through to the renderer.
*/
export declare class Cendertron {
app: Koa;
config: CrawlerOption;
private renderer;
private browser;
private crawlerScheduler;
private datastoreCache;
private port;
initialize(): Promise;
/**
* Checks whether or not the URL is valid. For example, we don't want to allow
* the requester to read the file system via Chrome.
*/
restricted(href: string): boolean;
handleRenderRequest(ctx: Koa.Context, url: string): Promise;
/** 处理爬虫的请求 */
handleScrape(ctx: Koa.Context, url: string): Promise;
handleScreenshotRequest(ctx: Koa.Context, url: string): Promise;
}