Releases: coregx/stream
Releases · coregx/stream
v0.1.0 - Initial release
🌊 stream v0.1.0 - Production-Ready SSE and WebSocket for Go 1.25+
✨ Highlights
- ✅ RFC 6455 compliant WebSocket - Full protocol implementation with 99 tests (84.3% coverage)
- ✅ RFC text/event-stream compliant SSE - Complete implementation with 215 tests (92.3% coverage)
- ✅ Zero external dependencies - Pure stdlib implementation
- ✅ Production-ready - 314 tests, load tested, stress tested
- ✅ High performance - 13K WebSocket broadcasts/s, near-zero allocation
- ✅ Type-safe - Generic Hub[T] for broadcasting
📦 Installation
go get github.com/coregx/stream@v0.1.0🚀 WebSocket Features
Core Implementation:
- RFC 6455 compliant WebSocket protocol
websocket.Conn- Connection with Read/Write APIwebsocket.Upgrade()- HTTP to WebSocket handshake- Frame parsing, fragment reassembly, UTF-8 validation
- Automatic Ping/Pong handling
- Close handshake with 15 standard codes
Broadcasting:
websocket.Hub- Multi-client broadcast manager- Thread-safe concurrent operations
Broadcast(),BroadcastText(),BroadcastJSON()- Automatic cleanup on failures
Performance:
- 11 μs/op for 10 clients
- 75 μs/op for 100 clients (~13K broadcasts/s)
- 223 MB/s throughput for large messages
🌊 SSE Features
Core Implementation:
sse.Event- Event builder with fluent APIsse.Conn- Connection managementsse.Hub[T]- Generic type-safe broadcasting- Automatic heartbeat support
Performance:
- 8 μs/op for 10 clients
- 52 μs/op for 100 clients
📊 Testing & Quality
- 314 total tests (215 SSE + 99 WebSocket)
- 84.3% coverage (SSE: 92.3%, WebSocket: 84.3%)
- 23 benchmarks with comprehensive metrics
- Load tested: 100 concurrent connections, 1,000 broadcasts
- Stress tested: 10MB messages, rapid connect/disconnect
📚 Documentation
- WebSocket Guide - 600+ lines
- SSE Guide
- README with Quick Start
- Comprehensive godoc for all public APIs
🎯 Examples
- WebSocket: Echo server, Chat server with Hub, Ping/Pong keep-alive
- SSE: Basic time stream, Multi-client chat
🙏 Special Thanks
Professor Ancha Baranova - This project would not have been possible without her invaluable help and support. Her assistance was crucial in making all coregx projects a reality.
Full changelog: https://github.com/coregx/stream/blob/main/CHANGELOG.md