Skip to content

Latest commit

 

History

History
232 lines (106 loc) · 3.58 KB

faastjs.faastmoduleproxy.md

File metadata and controls

232 lines (106 loc) · 3.58 KB
id title hide_title
faastjs.faastmoduleproxy
FaastModuleProxy class
true

faastjs > FaastModuleProxy

FaastModuleProxy class

Implementation of FaastModule.

Signature:

export declare class FaastModuleProxy<M extends object, O extends CommonOptions, S> implements FaastModule<M> 

Implements: FaastModule<M>

Remarks

FaastModuleProxy provides a unified developer experience for faast.js modules on top of provider-specific runtime APIs. Most users will not create FaastModuleProxy instances themselves; instead use faast(), or faastAws() or faastLocal(). FaastModuleProxy implements the FaastModule interface, which is the preferred public interface for faast modules. FaastModuleProxy can be used to access provider-specific details and state, and is useful for deeper testing.

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the FaastModuleProxy class.

Properties

Property

Modifiers

Type

Description

functions

ProxyModule<M>

Each call of a cloud function creates a separate remote invocation.

functionsDetail

ProxyModuleDetail<M>

Similar to FaastModule.functions except each function returns a Detail object

options

readonly

Required<CommonOptions>

The options set for this instance, which includes default values.

provider

Provider

The Provider, e.g. "aws".

Methods

Method

Modifiers

Description

cleanup(userCleanupOptions)

Stop the faast.js runtime for this cloud function and clean up ephemeral cloud resources.

costSnapshot()

Get a near real-time cost estimate of cloud function invocations.

logUrl()

The URL of logs generated by this cloud function.

off(name, listener)

Deregister a callback for statistics events.

on(name, listener)

Register a callback for statistics events.

stats(functionName)

Statistics for a specific function or the entire faast.js module.