TypeScript/Node.js SDK
The TypeScript SDK provides a simple, type-safe client for Node.js applications.Installation
Quick Start
API Reference
SlungClient
Main client class for connecting to Slung and sending events.
Constructor
url: WebSocket URL (default:ws://127.0.0.1:2077)
SlungEvent
Event structure for metrics:
Timestamp Helpers
Real-World Examples
Streaming Simulated Data
Fromexamples/simulated.ts:
Manual Event Sending
High-Throughput Ingestion
Binary Encoding
The SDK handles binary encoding automatically viaencodeEventBinary (from src/wire.ts):
Benchmarking
Run ingestion benchmarks:Error Handling
Other SDKs
Additional language SDKs are planned. Contributions welcome!Next Steps
WebSocket Protocol
Implement your own client using the protocol specification
Ingestion Overview
Learn about other ingestion methods