Skip to main content

AzureHandler

@h4ad/serverless-adapter > AzureHandler

(class) AzureHandler

The class that implements a serverless handler for Azure Function.

When you don't specify a custom logger, the logger is used instead.

Signature:

export declare class AzureHandler<TApp, TEvent, TCallback, TResponse, TReturn> extends DefaultHandler<TApp, TEvent, Context, TCallback, TResponse, TReturn> 

Extends: DefaultHandler <TApp, TEvent, Context, TCallback, TResponse, TReturn>

(constructor)

Default Constructor

Signature:

constructor(options?: AzureHandlerOptions | undefined);

Parameters

ParameterTypeDescription
optionsAzureHandlerOptions | undefined(Optional)

(method) createLoggerFromContext

Get the ILogger instance from logger of the context

Signature:

protected createLoggerFromContext(context: Context): ILogger;

Parameters

ParameterTypeDescription
contextContextThe Azure Context

Returns:

ILogger

(method) getHandler

Signature:

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

Parameters

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

Returns:

ServerlessHandler <TReturn>

(property) options

Signature:

protected readonly options?: AzureHandlerOptions | undefined;