5
0
Fork 0
Client subscribe counterpart to backend-publish.
 
 
Go to file
Daniel Lim 40da1b00bc Copy backend-protobuf/go in Dockerfile 2019-06-24 22:48:08 +08:00
backend-protobuf@a36ddf9a81 Added backend-protobuf as submodule 2019-06-23 08:45:55 +08:00
.env Use env for config instead of flags 2019-02-18 23:44:02 +08:00
.gitignore Initial commit 2019-02-16 00:16:53 +08:00
.gitmodules Added backend-protobuf as submodule 2019-06-23 08:45:55 +08:00
Dockerfile Copy backend-protobuf/go in Dockerfile 2019-06-24 22:48:08 +08:00
README.md backend-auth integration 2019-02-24 04:03:07 +08:00
go.mod Use env for config instead of flags 2019-02-18 23:44:02 +08:00
go.sum Use env for config instead of flags 2019-02-18 23:44:02 +08:00
main.go Added backend-protobuf as submodule 2019-06-23 08:45:55 +08:00

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.