Skip to main content

HttpHuaweiHandler

@h4ad/serverless-adapter > HttpHuaweiHandler

(class) HttpHuaweiHandler

The class that implements a huawei serverless handler with http function that exposes a http server in specific port.

In this Handler, you don't need to specific resolver and adapter, so you can use DummyAdapter and DummyResolver instead.

Signature:

export declare class HttpHuaweiHandler<TApp> implements HandlerContract<TApp, void, void, void, void, Promise<void>> 

Implements: HandlerContract <TApp, void, void, void, void, Promise<void>>

(constructor)

Construtor padrão

Signature:

constructor(options?: HttpHuaweiHandlerOptions | undefined);

Parameters

ParameterTypeDescription
optionsHttpHuaweiHandlerOptions | undefined(Optional)

(method) createHttpServer

The method that creates the instance of http server

Signature:

protected createHttpServer(requestListener: RequestListener): Server;

Parameters

ParameterTypeDescription
requestListenerRequestListenerO método que lidará com as requisições recebidas

Returns:

Server

(method) getHandler

Signature:

getHandler(app: TApp, framework: FrameworkContract<TApp>, _adapters: AdapterContract<void, void, void>[], _resolver: ResolverContract<void, void, void, void, void>, _binarySettings: BinarySettings, _respondWithErrors: boolean, log: ILogger): ServerlessHandler<Promise<void>>;

Parameters

ParameterTypeDescription
appTApp
frameworkFrameworkContract <TApp>
_adaptersAdapterContract <void, void, void>[]
_resolverResolverContract <void, void, void, void, void>
_binarySettingsBinarySettings
_respondWithErrorsboolean
logILogger

Returns:

ServerlessHandler <Promise<void>>

(property) options

Signature:

protected readonly options?: HttpHuaweiHandlerOptions | undefined;