UNPKG

@deep-foundation/deeplinks

Version:

[![npm](https://img.shields.io/npm/v/@deep-foundation/deeplinks.svg)](https://www.npmjs.com/package/@deep-foundation/deeplinks) [![Gitpod](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/deep-fo

66 lines (65 loc) 1.77 kB
export interface ContainerControllerOptions { gql_docker_domain: string; network?: string; handlersHash?: any; } export interface NewContainerOptions { handler: string; forceName?: string; forcePort?: number; forceRestart?: boolean; publish?: boolean; } export interface InitOptions { port: number; } export interface Container { name?: string; host?: string; port?: number; options?: NewContainerOptions; error?: string; } export interface CallOptions { code: string; jwt: string; secret?: string; path?: string; ssl?: string; data: any; container: Container; } export declare const runnerControllerOptionsDefault: ContainerControllerOptions; export declare class ContainerController { gql_docker_domain: string; network: string; delimiter: string; runContainerHash: { [id: string]: Promise<any>; }; handlersHash: { [id: string]: Container; }; constructor(options?: ContainerControllerOptions); _runContainer(containerName: string, dockerPort: number, options: NewContainerOptions): Promise<{ name: string; host: string; port: number; options: NewContainerOptions; } | { error: string; }>; newContainer(options: NewContainerOptions): Promise<Container>; findContainer(containerName: string): Promise<Container>; _dropContainer(containerName: string): Promise<string>; dropContainer(container: Container): Promise<void>; _checkAndRestart(container: Container): Promise<{ error?: string; }>; initHandler(container: Container): Promise<{ error?: string; }>; callHandler(options: CallOptions): Promise<{ error?: string; }>; }