redigo icon indicating copy to clipboard operation
redigo copied to clipboard

Add high-level pubsub API

Open garyburd opened this issue 8 years ago • 1 comments
trafficstars

Add high-level pubsub API that accomplishes the following goals:

  • Hides receive loop from application, possibly by calling application supplied function to handle notifications.
  • Uses context.Context to cancel subscriptions.
  • Provides way for application to backfill after dialing and subscribing.
  • Uses ping to check for live connection and server.
  • Optional: support using pool to get connections.
  • Optional: subscribe/unsubscribe after running.

garyburd avatar Nov 22 '17 04:11 garyburd

For those looking at something like this: https://github.com/rubenv/rrpubsub

Wrote this a long time ago (still works great!) and ticks pretty much all these boxes.

rubenv avatar Apr 28 '21 09:04 rubenv