import { Adaptor } from './adaptor/Adaptor'; import express from 'express'; import { AppStartOption } from './App'; import { SdkOption } from 'obniz-cloud-sdk'; import { FetcherFunction } from './types/fetcher'; export interface ManagerOptions { appToken: string; instanceName: string; adaptor: Adaptor; obnizSdkOption: SdkOption; customObnizFetcher?: FetcherFunction; } export declare class Manager { adaptor: Adaptor; private readonly _appToken; private readonly _obnizSdkOption; private _startOptions?; private _instanceName; private _syncing; private _syncTimeout?; private _healthCheckTimeout?; private _workerStore; private _installStore; private _express?; private customFetcher?; private _keyRequestExecutes; private _currentAppEventsSequenceNo; constructor({ appToken, adaptor, instanceName, obnizSdkOption, customObnizFetcher: customFetcher, }: ManagerOptions); start(option?: AppStartOption): void; startWait(option?: AppStartOption): Promise; private _startWeb; webhook: (req: express.Request, res: express.Response) => Promise; private _webhook; /** * instanceId がidのWorkerが新たに参加した * @param id */ private onInstanceAttached; /** * instanceId がidのWorkerが喪失した * @param id */ private onInstanceMissed; /** * instanceId がidのWorkerから新しい情報が届いた(定期的に届く) * @param id */ private onInstanceReported; private _startSyncing; private _startHealthCheck; private _syncInstalls; private _checkCustomFetcherInstalls; private _checkAllInstalls; private _checkDiffInstalls; private _addDevice; private _updateDevice; private _deleteDevice; private synchronize; private _writeSelfHeartbeat; private _healthCheck; private _onHealthCheckFailedWorkerInstance; hasSubClusteredInstances(): Promise; request(key: string, timeout: number): Promise<{ [key: string]: string; }>; directRequest(obnizId: string, key: string, timeout: number): Promise<{ [key: string]: string; }>; isFirstMaster(): boolean; doAllRelocate(): Promise; onShutdown(): Promise; }