You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
4 years ago | |
---|---|---|
backend-protobuf@a36ddf9a81 | 4 years ago | |
.env | 4 years ago | |
.gitignore | 4 years ago | |
.gitmodules | 4 years ago | |
Dockerfile | 4 years ago | |
README.md | 4 years ago | |
go.mod | 4 years ago | |
go.sum | 4 years ago | |
main.go | 4 years ago |
README.md
backend-subscribe
Client subscribe counterpart to backend-publish. Subscribe to receive the results of your requests to backend-publish in some weird extended streaming async HTTP-ish thing. Refer to backend-store
.
To run this service securely means to run it behind traefik forwarding auth to backend-auth
Environment Variables
Supply environment variables by either exporting them or editing .env
.
ENV | Description | Default |
---|---|---|
LISTEN | Host and port number to listen on | :8080 |
NATS | Host and port of nats | nats://localhost:4222 |
API
GET /subscribe
Subscribe to your SSE stream.
Required headers
Name | Description |
---|---|
X-User-Claim | Stringified user claim, populated by backend-auth called by traefik |
Success Response (200 OK)
An EventSource stream.
Event
{
"code": <http status code>
"message": <message>
}
Errors
Code | Description |
---|---|
400 | Invalid user claims header. |