Skip to content

A pure rust pubsub server

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

hexcowboy/stetson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stetson

Stetson is a pure rust pubsub server over HTTP websockets.

Use it vanilla or fork it and make your own modifications.

Usage

Install the binary

cargo install stetson

Run the server, making sure to set a publisher key

echo "PUBLISH_KEY=$(openssl rand -hex 24)" > .env ; stetson

You can find the publisher key that was generated in the previous step in the .env file

cat .env

Requests

subscribe

{ "subscribe": { "topics": ["sports", "weather"] } }

unsubscribe

{ "unsubscribe": { "topics": ["sports"] } }

publish

{ "publish": { "topics": ["weather"], "message": "storms ahead", "key": "..." } }

Responses

message - received when a new message from a subscribed topic is received

{ "message": { "topic": "weather", "message": "storms ahead" } }

error - received when there was en error publishing a message

{ "error": { "message": "some error message here" } }

License

Licensed under either of

About

A pure rust pubsub server

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages