/// import { EventEmitter } from 'events'; import PluginManager from './PluginSystem/PluginManager'; import { ClientManager, PROCESS_EVENTS, ClientManagerConfig, FetchClientOptions } from './Clients/ClientManager'; import { WORKFLOW_TAGS, PLUGIN_TYPES } from './constants'; import Workflow from './Workflows/Workflow'; import { IPackage, GetKeyOptions } from 'ethpkg'; import IPlugin from './PluginSystem/IPlugin'; import Client, { ClientStartOptions } from './Clients/Client'; import WorkflowManager, { PublishWorkflowOptions, GetWorkflowOptions, CreateWorkflowOptions } from './Workflows/WorkflowManager'; import { StateListener } from './StateListener'; import { Flags } from './Clients/Flags'; export { WORKFLOW_TAGS, PLUGIN_TYPES, PROCESS_EVENTS }; export declare function instanceofClientManagerConfig(object: any): object is ClientManagerConfig; export interface ILogger { listener: StateListener; } export interface GridOptions { logger?: ILogger; } export default class Grid extends EventEmitter { pluginManager: PluginManager; clientManagers: Array; isReady: boolean; workflowManager: WorkflowManager; config: { [index: string]: any; }; logger: ILogger; constructor(options?: GridOptions); private init; setLogger(logger?: ILogger): void; getCachePath(): Promise; /** * Instead of making this public and having * implementers worry about lifecycle or forget to wait about init * we should keep this private and just wait in methods were information * from init is required */ private whenReady; /** * returns the list of all evaluated plugin exports * i.e. the configuration they produce when run on this machine */ getAllPlugins(): Promise>; createClientManager(config: ClientManagerConfig, pluginCtx?: IPackage): Promise; /** * return the list of client managers i.e. * wrapped plugins that specify how to fetch and configure eth binaries */ getAllClientManagers(): Promise>; getClientManager(name: string): Promise; /** * returns a list of **all** clients independent of client managers * clients refer to binary+config and a state [running, connected] */ getAllClients(): Promise>; getClient(clientManagerSpec: string | ClientManagerConfig, options?: FetchClientOptions): Promise; startClient(client: Client): Promise; startClient(client: Client, flags: Array, options?: ClientStartOptions): Promise; startClient(client: Client, flags: Flags, options?: ClientStartOptions): Promise; stopClient(client: Client): Promise; stopClients(...clients: Client[]): Promise; /** * This will return an unlocked key if it can be found in keystore * If not it can create a new one * @param options */ getSigningKey(options?: GetKeyOptions): Promise; createWorkflow(options: CreateWorkflowOptions): Promise; loadWorkflow(workflowPathOrPkg: string | IPackage): Promise; getAllWorkflows(): Promise>; getWorkflow(workflowSpec: string, options?: GetWorkflowOptions): Promise; publishWorkflow(workflowPath: string, options?: PublishWorkflowOptions): Promise; startWebApp(queryOrUrl: string, { listener }?: any): Promise; startApiServer(): Promise; } //# sourceMappingURL=Grid.d.ts.map