Julian design for API library with Websocket client

I’m writing a Julia library to interact with an API that communicates via HTTP.Websockets. I’m struggling to find good, non-toy-repl, examples that illustrate the kind of contract a Julia dev would expect. In OO land it’s not uncommon to create an object that manages the stream with overwritten methods, but this doesn’t strike me as terribly Julian.

If you were using an library to access streaming data via websocket (Reddit, Coinbase, Slack, etc.) what kind of contract would you expect?

I realize this question is a little more art than science. If anyone has ideas or can point me to good examples in Julia I’d be very appreciative!

Have you looked at Channels?

I remember reading about them when I first got into Julia, but the thought didn’t cross my mind to use them here. The pub/sub model is exactly what I’m going for though. Thanks!