-
Notifications
You must be signed in to change notification settings - Fork 0
Eventing Flow
Events can be emitted from any service. And each of those events can be one of several types of actions. Other services can listen for events based on a particular service type.
Here is a typical event flow for services listening for each other:
-
Services can listen for the service types they're interested in, by registering with Locker's event core
GET /<serviceRequestingTheListen>/listen?type=test%2fevent&cb=eventCallbackURI
-
When a service emits an event it sends core the object to emit, the action, and the service type.
{type:"contact/google", obj:{..}, action:"create"}```
-
Locker core wraps the object in a simple structure with the id of the service that is emitting the event and the local timestamp that it was processed
{via:"twitter", action:"create", timestamp:"2001-11-22T...", obj:{...} }
(via is the ID of the me.json file of the connector/
-
Locker core POSTs the event to the registered URL listeners that registered in step 1.