@micro.ts/core
Version:
Microservice framework with Typescript
15 lines (14 loc) • 801 B
TypeScript
import { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
import { Action } from '../../../server/types';
import { DefinitionHandlerPair } from '../../AbstractBroker';
import { HttpBroker, HttpVerbs, IHttpListnerConfig } from '../HttpBroker';
export declare class FastifyBroker extends HttpBroker<FastifyInstance, FastifyRequest, FastifyReply<any>, IHttpListnerConfig> {
name: string;
protected server: FastifyInstance;
protected requestMapper: (r: FastifyRequest) => Promise<Action>;
protected paramWrapper(paramName: string): string;
protected registerHandler(value: DefinitionHandlerPair[], route: string, method: HttpVerbs): void;
protected respond(result: Action, ctx: FastifyReply<any>): any;
start(): Promise<void>;
protected construct(): void;
}