Streams events received from Krateo EventRouter using Server-Sent Events (SSE).
Subscribed to the eventrouter service as event receiver.
- patches the received event adding a label that references the composition to which the event belongs
- stores the event both in an internal queue and in an etcd storage
This service exposes two main endpoints:
/notifications, which uses SSE to send events (either all events or only those belonging to a specific composition) to the client/events, which returns the list of all events; eventually filtered for a specific composition
Check the /swagger/index.html url for more details about all the API.
In the following examples $HOST is the address of your eventsse instance and $PORT it's listening port.
$ curl -v "$HOST:$PORT/notifications$ curl -v "$HOST:$PORT/eventsBy specific composition :
$ curl -v "$HOST:$PORT/events/$COMPOSITION_IDThis service must be registered to the eventrouter (subscription) using a manifest like this:
apiVersion: eventrouter.krateo.io/v1alpha1
kind: Registration
metadata:
name: eventsse
namespace: demo-system
spec:
serviceName: Eventrouter SSE
endpoint: $HOST:$PORT/handlewhere:
$HOST: is the address of your eventsse instance (i.e.http://eventsse-internal.demo-system.svc.cluster.local)$PORT: is the listening port of your eventsse instance