UNPKG

@creditkarma/thrift-server-hapi

Version:

A Hapi server plugin for the Apache Thrift protocol

24 lines (23 loc) 809 B
import * as Hapi from '@hapi/hapi'; import * as Core from '@creditkarma/thrift-server-core'; import { IHapiPluginOptions, ThriftHapiPlugin } from './types'; export declare const DEFAULT_PATH: string; declare module '@hapi/hapi' { interface PluginProperties { thrift?: { transport: Core.TransportType; protocol: Core.ProtocolType; services: { [name: string]: { processor: Core.IThriftProcessor<Hapi.Request>; }; }; }; } interface PluginsStates { thrift?: { requestMethod: string; }; } } export declare function ThriftServerHapi<TProcessor extends Core.IThriftProcessor<Hapi.Request>>(pluginOptions: IHapiPluginOptions<TProcessor>): ThriftHapiPlugin;