Implementation of an API compatible server for the Emojitracker Streaming API Specification in Go.
This was originally my first major Go project, so there may potentially still be some silly stuff left in the code here.
Goroutines and channels make it just too much fun to think about things as flow
diagrams. This is the essential pipeline for information flow in the main()
function for the program.
This program doesn't actually do too much beyond the pipeline flow above, as all of the SSE/HTTP server logic has been extracted into a handy modular package that should be usable for any generic SSE broadcasting. For that stuff, delve into the (freely licensed!) sseserver repo.
A sandbox environment is provided to test via Docker Compose, using emojitrack/fakefeeder to simulate production traffic.
Simply run docker compose up
and you'll have a local environment to test
against, with the streamer exposed on port 8001. Try curl http://localhost:8001/subscribe/eps
for example.
Currently handled on Heroku, to add remotes manually after cloning the repository:
heroku git:remote --remote production emojitrack-gostreamer
heroku git:remote --remote staging emojitrack-gostreamer-staging
Simply git pushing to either will build and update.
Yes.:racehorse: