Sign inSign up

yadd/lemonldap-ng-pubsub-server

By yadd

•Updated about 5 hours ago

LemonLDAP::NG alternative pub/sub server

Image
0

10K+

yadd/lemonldap-ng-pubsub-server repository overview

⁠yadd/lemonldap-ng-webpubsub

Web Pub/Sub server for LemonLDAP::NG⁠

⁠Synopsys

⁠Run the server
$ docker run -p 8080:8080 -e PUBSUB_TOKEN=qwerty yadd/lemonldap-ng-webpubsub
⁠Test it
  • Reader
$ wscat -H 'Authorization: Bearer qwerty' -c ws://localhost:8080/subscribe?channels=chan1
  • Publisher
$ curl -XPOST -d '{"foo":"bar","bar":"baz","baz":"foo","channel":"chan1"}' -H 'Authorization: Bearer qwerty' http://localhost:8080/publish

⁠Variables

  • PUBSUG_ACCESS_LOG, default STDERR (to get access logs on docker console)
  • PUBSUB_CERT
  • PUBSUB_DEBUG
  • PUBSUB_KEY
  • PUBSUB_MAX_REQUEST_SIZE, default 8192
  • PUBSUB_MAX_REQUEST_TIME, default 5
  • PUBSUB_QUIET, default 1
  • PUBSUB_PORT, default: 8443 if PUBSUB_CERT and PUBSUB_KEY are set, 8080 else
  • PUBSUB_TOKEN

⁠API

⁠Publisher
  • URL: /publish
  • Method: POST
  • Headers:
    • Authorization (optional): f a token is required, set it here in the form:
Authorization: Bearer <value>
  • Request body: JSON content with at least a "channel" key (the channel where the message will be published)
⁠Reader (websockets)
  • URL: /subscribe (this opens the websocket)
  • Method: GET
  • Headers:
    • Authorization (optional): f a token is required, set it here in the form:
Authorization: Bearer <value>
  • Query (GET parameters):
    • channels (required): comma separated list of channels to subscribe to.

Tag summary

Content type

Image

Digest

sha256:40cffa017…

Size

17.4 MB

Last updated

about 5 hours ago

docker pull yadd/lemonldap-ng-pubsub-server