FaastModuleProxy class
Implementation of FaastModule.
Signature:
export declare class FaastModuleProxy<M extends object, O, S> 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(), faastGoogle(), 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 | Promisified<M> | Each call of a cloud function creates a separate remote invocation. | |
options | Required<CommonOptions> | The options set for this instance, which includes default values. | |
provider | Provider | The Provider, e.g. "aws" or "google". |
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. |