Skip to content

feat: Robust connection handling, structured logging, and keepalive improvements (v1.5.0)#62

Closed
okaris wants to merge 9 commits into
recws-org:masterfrom
inference-sh:main
Closed

feat: Robust connection handling, structured logging, and keepalive improvements (v1.5.0)#62
okaris wants to merge 9 commits into
recws-org:masterfrom
inference-sh:main

Conversation

@okaris

@okaris okaris commented Jun 2, 2025

Copy link
Copy Markdown

This PR introduces significant improvements to the recws library:

Key Changes:

  • Replace sleep-based connection wait with proper channel synchronization
  • Add structured logging with configurable levels (Debug, Info, Warn, Error)
  • Improve keepalive mechanism with proper cleanup and better timeout handling
  • Add microsecond precision to timestamps
  • Enhance error handling and logging throughout
  • Improve shutdown method implementation
  • Update documentation with quick start guide and features
  • Forked repository to github.com/inference.sh/recws

Breaking Changes:

  • Removed NonVerbose flag in favor of LogLevel configuration
  • Changed connection handling in Dial() to properly wait for establishment

Credits:
Original work by recws-org/recws is preserved and acknowledged in the README.

@okaris

okaris commented Jun 2, 2025

Copy link
Copy Markdown
Author

Most likely fixes all:
#57
#20
#43
#42
#39
#38
#20
#19
#61

@okaris

okaris commented Jun 2, 2025

Copy link
Copy Markdown
Author

Until this is merged and published, feel free to use my fork https://github.com/inference-sh/recws

@loeffel-io

loeffel-io commented Jun 2, 2025

Copy link
Copy Markdown
Member

Amazing, thanks! please change the inference-sh infos to recws for a proper review

@loeffel-io

loeffel-io commented Jun 2, 2025

Copy link
Copy Markdown
Member

first look: we need a logger interface that we could put into the recws conn

@okaris

okaris commented Jun 2, 2025

Copy link
Copy Markdown
Author

you're right, i was overthinking it with the wrapper. slog already gives us everything we need. just exposed it as a logger config in RecConn so users can configure it cleanly from outside. Added a proper example in advanced.go showing how to set it up.

PR incoming with the proper urls

@okaris

okaris commented Jun 2, 2025

Copy link
Copy Markdown
Author

Closing in favor of #63

@okaris okaris closed this Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants