redbird
Version:
A reverse proxy with support for dynamic tables
31 lines (29 loc) • 1.09 kB
TypeScript
import { Redbird } from './proxy.js';
/**
Redbird Docker Module.
This module handles automatic regitration and de-registration of
services running on docker containers.
*/
export declare class DockerModule {
private redbird;
private targets;
private images;
private ports;
private dolphin;
private events;
private log;
constructor(redbird: Redbird, url: string);
registerIfNeeded(imageName: string, containerId: string, containerName: string): void;
/**
* Register route from a source to a given target.
* The target should be an image name. Starting several containers
* from the same image will automatically deliver the requests
* to each container in a round-robin fashion.
*
* @param src See {@link ReverseProxy.register}
* @param target Docker image (this string is evaluated as regexExp)
* @param opts Options like ssl and etc...
*/
register(src: string, target: string, opts: any): void;
registerContainer(src: string | URL, containerId: string, opts: any): Promise<void>;
}