faastjs package
Faast.js transforms ordinary JavaScript modules into serverless cloud functions that can run on AWS Lambda.
The main entry point to faast.js is the faast() function, which returns an object that implements the FaastModule interface. The most common options are CommonOptions. Using faast.js requires writing two modules, one containing the functions to upload to the cloud, and the other that invokes faast.js and calls the resulting cloud functions.
Classes
Class |
Description |
---|---|
A line item in the cost estimate, including the resource usage metric measured and its pricing. | |
A summary of the costs incurred by a faast.js module at a point in time. Output of FaastModule.costSnapshot(). | |
FaastError is a subclass of VError (https://github.com/joyent/node-verror). that is thrown by faast.js APIs and cloud function invocations. | |
Implementation of FaastModule. | |
Summary statistics for function invocations. | |
Summarize statistics about cloud function invocations. | |
A simple persistent key-value store. Used to implement Limits.cache for throttle(). | |
Incrementally updated statistics on a set of values. |
Enumerations
Enumeration |
Description |
---|---|
Possible FaastError names. See FaastError. To test for errors matching these names, use the static method FaastError.hasCauseWithName(). |
Functions
Function |
Description |
---|---|
The main entry point for faast with any provider and only common options. | |
The main entry point for faast with AWS provider. | |
The main entry point for faast with Local provider. | |
A decorator for rate limiting, concurrency limiting, retry, memoization, and on-disk caching. See Limits. |
Interfaces
Interface |
Description |
---|---|
Factory for AWS service clients, which allows for custom construction and configuration. AWS Configuration. | |
AWS-specific options for faastAws(). | |
Options that apply to the FaastModule.cleanup() method. | |
Options common across all faast.js providers. Used as argument to faast(). | |
A function return value with additional detailed information. | |
The main interface for invoking, cleaning up, and managing faast.js cloud functions. Returned by faast(). | |
Options for the CommonOptions.include option. | |
Specify throttle() limits. These limits shape the way throttle invokes the underlying function. | |
Local provider options for faastLocal(). |
Namespaces
Namespace |
Description |
---|---|
Analyze the cost of a workload across many provider configurations. |
Variables
Variable |
Description |
---|---|
Faast.js loggers. | |
An array of all available provider. |
Type Aliases
Type Alias |
Description |
---|---|
| |
| |
The return type of faastAws(). See FaastModuleProxy. | |
Valid AWS regions. Not all of these regions have Lambda support. | |
The return type of faastLocal(). See FaastModuleProxy. | |
The type of all supported cloud providers. | |
| |
Similar to ProxyModule except each function returns a Detail object. |