Creates a new instance of this client.
a service name.
The AWS connection parameters
The connection resolver.
The performance counters.
The dependencies resolver.
The reference to AWS Lambda Function.
The logger.
The opened flag.
Calls a AWS Lambda Function action.
an action name to be called.
(optional) transaction id to trace execution through call chain.
(optional) action parameters.
(optional) callback function that receives result object or error.
Calls a remote action in AWS Lambda function. The name of the action is added as "cmd" parameter to the action parameters.
an action name
(optional) transaction id to trace execution through call chain.
command parameters.
callback function that receives result or error.
Calls a AWS Lambda Function action asynchronously without waiting for response.
an action name to be called.
(optional) transaction id to trace execution through call chain.
(optional) action parameters.
(optional) callback function that receives error or null for success.
Closes component and frees used resources.
(optional) transaction id to trace execution through call chain.
callback function that receives error or null no errors occured.
Configures component by passing configuration parameters.
configuration parameters to be set.
Adds instrumentation to log calls and measure call time. It returns a Timing object that is used to end the time measurement.
(optional) transaction id to trace execution through call chain.
a method name.
Timing object to end the time measurement.
Performs AWS Lambda Function invocation.
an invocation type: "RequestResponse" or "Event"
an action name to be called.
(optional) transaction id to trace execution through call chain.
action arguments
callback function that receives action result or error.
Checks if the component is opened.
true if the component has been opened and false otherwise.
Opens the component.
(optional) transaction id to trace execution through call chain.
callback function that receives error or null no errors occured.
Sets references to dependent components.
references to locate the component dependencies.
Generated using TypeDoc
Abstract client that calls commandable AWS Lambda Functions.
Commandable services are generated automatically for ICommandable objects. Each command is exposed as action determined by "cmd" parameter.
Configuration parameters
References
*:logger:*:*:1.0
(optional) ILogger components to pass log messages*:counters:*:*:1.0
(optional) ICounters components to pass collected measurements*:discovery:*:*:1.0
(optional) IDiscovery services to resolve connection*:credential-store:*:*:1.0
(optional) Credential stores to resolve credentialsLambdaFunction
Example
class MyLambdaClient extends CommandableLambdaClient implements IMyClient { ... public getData(correlationId: string, id: string, callback: (err: any, result: MyData) => void): void { this.callCommand( "get_data", correlationId, { id: id }, (err, result) => { callback(err, result); } ); } ... } let client = new MyLambdaClient(); client.configure(ConfigParams.fromTuples( "connection.region", "us-east-1", "connection.access_id", "XXXXXXXXXXX", "connection.access_key", "XXXXXXXXXXX", "connection.arn", "YYYYYYYYYYYYY" )); client.getData("123", "1", (err, result) => { ... });