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
Parameter | Type | Description |
---|---|---|
options | HttpHuaweiHandlerOptions | undefined | (Optional) |
(method) createHttpServer
The method that creates the instance of http server
Signature:
protected createHttpServer(requestListener: RequestListener): Server;
Parameters
Parameter | Type | Description |
---|---|---|
requestListener | RequestListener | O 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
Parameter | Type | Description |
---|---|---|
app | TApp | |
framework | FrameworkContract <TApp> | |
_adapters | AdapterContract <void, void, void>[] | |
_resolver | ResolverContract <void, void, void, void, void> | |
_binarySettings | ||
_respondWithErrors | boolean | |
log |
Returns:
ServerlessHandler <Promise<void>>
(property) options
Signature:
protected readonly options?: HttpHuaweiHandlerOptions | undefined;