UNPKG

@micro.ts/core

Version:

Microservice framework with Typescript

16 lines (15 loc) 742 B
import { HttpBroker, HttpVerbs, IHttpListnerConfig } from "../HttpBroker"; import koa from 'koa'; import { Action } from "../../../server/types"; import { DefinitionHandlerPair } from "../../AbstractBroker"; export declare class KoaBroker extends HttpBroker<koa, koa.Context, koa.Context, IHttpListnerConfig> { name: string; private readonly router; protected server: koa; protected paramWrapper(paramName: string): string; protected respond(result: Action, ctx: koa.Context): koa.Context; protected registerHandler(value: DefinitionHandlerPair[], route: string, method: HttpVerbs): void; protected requestMapper: (r: koa.Context) => Promise<Action>; start(): Promise<void>; protected construct(): void; }