One Observability Workshop v3.0.0
One Observability Workshop / serverless/functions/traffic-generator/traffic-generator / TrafficGeneratorFunction
Class: TrafficGeneratorFunction¶
Defined in: serverless/functions/traffic-generator/traffic-generator.ts:33
Node.js Lambda that generates synthetic traffic against the workshop microservices.
Extends¶
Constructors¶
Constructor¶
new TrafficGeneratorFunction(
scope,id,properties):TrafficGeneratorFunction
Defined in: serverless/functions/traffic-generator/traffic-generator.ts:35
Parameters¶
scope¶
Construct
id¶
string
properties¶
WorkshopLambdaFunctionProperties
Returns¶
TrafficGeneratorFunction
Overrides¶
WokshopLambdaFunction.constructor
Properties¶
function¶
function:
Function
Defined in: constructs/lambda.ts:258
The Lambda function instance
Inherited from¶
WokshopLambdaFunction.function
api¶
api:
LambdaRestApi
Defined in: serverless/functions/traffic-generator/traffic-generator.ts:34
Methods¶
scheduleFunction()¶
scheduleFunction(
scheduleExpression):void
Defined in: constructs/lambda.ts:376
Use event bridge to schedule the function execution using the specified schedule expression
Parameters¶
scheduleExpression¶
string
Returns¶
void
Inherited from¶
WokshopLambdaFunction.scheduleFunction
addFunctionPermissions()¶
addFunctionPermissions():
void
Defined in: serverless/functions/traffic-generator/traffic-generator.ts:70
Adds IAM permissions required by the Lambda function. Must be implemented by concrete subclasses.
Returns¶
void
Overrides¶
WokshopLambdaFunction.addFunctionPermissions
createOutputs()¶
createOutputs():
void
Defined in: serverless/functions/traffic-generator/traffic-generator.ts:109
Creates CloudFormation outputs for the Lambda function. Must be implemented by concrete subclasses.
Returns¶
void
Overrides¶
WokshopLambdaFunction.createOutputs
getEnvironmentVariables()¶
getEnvironmentVariables(): {[
key:string]:string; } |undefined
Defined in: serverless/functions/traffic-generator/traffic-generator.ts:110
Returns environment variables for the Lambda function. Must be implemented by concrete subclasses.
Returns¶
{[key: string]: string; } | undefined
Map of environment variable names to values
Overrides¶
WokshopLambdaFunction.getEnvironmentVariables
getBundling()¶
getBundling():
BundlingOptions
Defined in: serverless/functions/traffic-generator/traffic-generator.ts:117
Returns bundling options for the Lambda function code. Must be implemented by concrete subclasses.
Returns¶
BundlingOptions
Bundling configuration options
Overrides¶
WokshopLambdaFunction.getBundling
getLayers()¶
getLayers():
ILayerVersion[]
Defined in: serverless/functions/traffic-generator/traffic-generator.ts:124
Returns Lambda layers to be attached to the function. Must be implemented by concrete subclasses.
Returns¶
ILayerVersion[]
Array of Lambda layer versions