command
Version:
v0.2.0
Opens a new window with list of versions in this module.
Published: Dec 19, 2025
License: Apache-2.0
Opens a new window with license information.
Imports: 14
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Multi-Sink Pipeline Example
This example demonstrates how to build a data pipeline that dispatches scanned events to multiple destinations (Sinks) simultaneously.
Features Shown
- Multiple Contracts: Monitoring both USDT and USDC.
- Persistence: Using Redis for tracking progress (optional).
- Pipeline Architecture: Sending the same event data to:
- Console: For real-time monitoring.
- File: For persistent logging (
events.jsonl).
- Graceful Shutdown: Handling OS signals to stop the scanner safely.
How to Run
-
Run the example:
go run main.go
-
Check Output:
- Watch the terminal for console JSON output.
- Check the
events.jsonl file created in the current directory.
Configuration Notes
- The example uses Ankr's public RPC node.
- If
REDIS_ADDR environment variable is set, it will attempt to use Redis for cursor persistence.
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.