Skip to main content

HandlerContract

@h4ad/serverless-adapter > HandlerContract

(interface) HandlerContract

The interface that represents the contract between the handler and the real implementation

Signature:

export interface HandlerContract<TApp, TEvent, TContext, TCallback, TResponse, TReturn> 

(method) getHandler

Get the handler that will handle serverless requests

Signature:

getHandler(app: TApp, framework: FrameworkContract<TApp>, adapters: AdapterContract<TEvent, TContext, TResponse>[], resolverFactory: ResolverContract<TEvent, TContext, TCallback, TResponse, TReturn>, binarySettings: BinarySettings, respondWithErrors: boolean, log: ILogger): ServerlessHandler<TReturn>;

Parameters

ParameterTypeDescription
appTApp
frameworkFrameworkContract <TApp>
adaptersAdapterContract <TEvent, TContext, TResponse>[]
resolverFactoryResolverContract <TEvent, TContext, TCallback, TResponse, TReturn>
binarySettingsBinarySettings
respondWithErrorsboolean
logILogger

Returns:

ServerlessHandler <TReturn>