Passthrough
Unstable API
0.10.0
@project-lakechain/passthrough
The Passthrough middleware acts, as its name implies, as a passthrough for document events. Its main purpose is to log document events and their associated metadata.
➡️ Logging Events
Section titled “➡️ Logging Events”To use this middleware, you import it in your CDK stack and instantiate it as part of a pipeline.
import { Passthrough } from '@project-lakechain/passthrough';import { CacheStorage } from '@project-lakechain/core';
class Stack extends cdk.Stack { constructor(scope: cdk.Construct, id: string) { // The cache storage. const cache = new CacheStorage(this, 'Cache');
// The passthrough middleware. const passthrough = new Passthrough.Builder() .withScope(this) .withIdentifier('Passthrough') .withCacheStorage(cache) .withSource(source) // 👈 Specify a data source .build(); }}Resolving Metadata
Section titled “Resolving Metadata”As seen in the Events section, metadata associated with a document event can contain Pointers to other documents. You can configure the Passthrough middleware to resolve those pointers and log their value in CloudWatch logs for debugging purposes.
const passthrough = new Passthrough.Builder() .withScope(this) .withIdentifier('Passthrough') .withCacheStorage(cache) .withSource(source) .withResolveMetadata(true) .build();🏗️ Architecture
Section titled “🏗️ Architecture”The Passthrough middleware executes within a Lambda compute, consumes input events, logs their information to AWS CloudWatch Logs and passes through the events to the next middlewares in the pipeline.

🏷️ Properties
Section titled “🏷️ Properties”Supported Inputs
Section titled “Supported Inputs”| Mime Type | Description |
|---|---|
*/* |
The passthrough middleware can consume any type of document. |
Supported Outputs
Section titled “Supported Outputs”| Mime Type | Description |
|---|---|
*/* |
The passthrough middleware can produce any type of document. |
Supported Compute Types
Section titled “Supported Compute Types”| Type | Description |
|---|---|
CPU |
This middleware is based on a Lambda architecture. |
📖 Examples
Section titled “📖 Examples”- Delay Pipeline - An example showcasing how to delay a pipeline execution.