proxy.golang.org : github.com/christophersw/sseserver
Package sseserver implements a reference Server-Sent Events server, suitable for streaming unidirectional messages over HTTP to web browsers. This implementation also adds easy namespacing so that clients can subscribe to only a specific subset of messages. For more information on the SSE format itself, check out this fairly comprehensive article: http://www.html5rocks.com/en/tutorials/eventsource/basics/ Note that the implementation of SSE in this server intentionally does not implement message IDs. The server opens a HTTP endpoint at /subscribe/:namespace that will accept connections on any suitable child path. The remainder of the path is a virtual endpoint represents the "namespace" for the client connection. For example: SSEMessages broadcast via the server are only delivered to clients subscribed to the endpoint matching their namespace. Namespaces are hierarchical, subscribing to the "parent" endpoint would receive all messages broadcast to all child namespaces as well. E.g. in the previous example, a subscription to "/pets" would receive all messages broadcast to both the dogs and cats namespaces as well.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/christophersw/sseserver
License: AGPL-3.0
Latest release: almost 2 years ago
First release: almost 2 years ago
Namespace: github.com/christophersw
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 17 days ago