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

Parameter

Type

Description

options

AzureHandlerOptions | undefined

(Optional)

(method) createLoggerFromContext

Get the ILogger instance from logger of the context

Signature:

protected createLoggerFromContext(context: Context): ILogger;

Parameters

Parameter

Type

Description

context

Context

The 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

Parameter

Type

Description

app

TApp

framework

FrameworkContract <TApp>

adapters

AdapterContract <TEvent, Context, TResponse>[]

resolverFactory

ResolverContract <TEvent, Context, TCallback, TResponse, TReturn>

binarySettings

BinarySettings

respondWithErrors

boolean

log

ILogger

Returns:

ServerlessHandler <TReturn>

(property) options

Signature:

protected readonly options?: AzureHandlerOptions | undefined;