Go to file
Elis Hirwing bde2eb067e
hub: Use sync to use read and write locks for map with active subscriptions
2020-11-21 15:08:35 +01:00
hub hub: Use sync to use read and write locks for map with active subscriptions 2020-11-21 15:08:35 +01:00
.envrc Add some nix env files for nix shell 2020-11-20 22:06:53 +01:00
.gitignore hub: Import mux and listen to requests 2020-11-20 23:27:25 +01:00
README.org README: Add readme 2020-11-21 09:29:23 +01:00
docker-compose.yml docker-compose: Restart the client on failure 2020-11-21 07:58:19 +01:00
shell.nix Add some nix env files for nix shell 2020-11-20 22:06:53 +01:00

README.org

Web Sub Hub test build

Run as normal with docker-compose up

Check the log to see that the hub builds and starts up, the hub will then print a message like:

2020/11/21 08:25:06 Created subscription for a-topic

While the client prints:

time="2020-11-21T08:25:12Z" level=info msg="Got a post, and all is good"

Make the hub send messages

Take your browser and head to http://127.0.0.1:8080/spam/a-topic

The last bit decides which topic to send messages to.