package awscdkkinesisfirehosealpha import ( "github.com/aws/aws-cdk-go/awscdk/v2" ) // Configure the data processor. // // Example: // var bucket bucket // // Provide a Lambda function that will transform records before delivery, with custom // // buffering and retry configuration // lambdaFunction := lambda.NewFunction(this, jsii.String("Processor"), &FunctionProps{ // Runtime: lambda.Runtime_NODEJS_14_X(), // Handler: jsii.String("index.handler"), // Code: lambda.Code_FromAsset(path.join(__dirname, jsii.String("process-records"))), // }) // lambdaProcessor := firehose.NewLambdaFunctionProcessor(lambdaFunction, &DataProcessorProps{ // BufferInterval: awscdk.Duration_Minutes(jsii.Number(5)), // BufferSize: awscdk.Size_Mebibytes(jsii.Number(5)), // Retries: jsii.Number(5), // }) // s3Destination := destinations.NewS3Bucket(bucket, &S3BucketProps{ // Processor: lambdaProcessor, // }) // firehose.NewDeliveryStream(this, jsii.String("Delivery Stream"), &DeliveryStreamProps{ // Destinations: []iDestination{ // s3Destination, // }, // }) // // Experimental. type DataProcessorProps struct { // The length of time Kinesis Data Firehose will buffer incoming data before calling the processor. // // s. // Experimental. BufferInterval awscdk.Duration `field:"optional" json:"bufferInterval" yaml:"bufferInterval"` // The amount of incoming data Kinesis Data Firehose will buffer before calling the processor. // Experimental. BufferSize awscdk.Size `field:"optional" json:"bufferSize" yaml:"bufferSize"` // The number of times Kinesis Data Firehose will retry the processor invocation after a failure due to network timeout or invocation limits. // Experimental. Retries *float64 `field:"optional" json:"retries" yaml:"retries"` }