-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial reaction sdk (nodejs) #106
Conversation
Seems like we are able to retrieve the queyrId from the event console.log(`Received change sequence: ${event.sequence} for query ${event.queryId}`); Does this mean that we do not need to specify the queryIds in the reaction yaml file anymore? |
@@ -28,6 +28,8 @@ pub struct ProviderSpecDto { | |||
#[derive(Serialize, Deserialize, Debug)] | |||
pub struct ProviderServiceDto { | |||
pub image: String, | |||
#[serde(rename = "externalImage")] | |||
pub external_image: Option<bool>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does external_image do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Added externalImage flag to services for sources/reaction to indicate that an image should/not be pulled from the Drasi registry. This enables users to publish their reaction/source images to their own registry.
We still do, because you might not want a reaction to listen to all queries. You will only get events for the queries configured in the yaml, but this tells you which one of those it is. |
Ah I see, is this how the Reaction will know which queries it should listen for from the yaml(copied from the advanced example)? let myReaction = new DrasiReaction(onChangeEvent, {
parseQueryConfig: parseYaml, // Parse the per query configuration from Yaml
onControlEvent: onControlEvent
}); |
No, that is how it extracts per query config. The list of queries to listen to is dealt with internally by the library, the user does not need to think about it. |
Oh that's cool. I'm so not used to the fact that we don't need to explicitly pubsub the queries |
ff4d1a5
to
7d64a44
Compare
Description
externalImage
flag to services for sources/reaction to indicate that an image should/not be pulled from the Drasi registry. This enables users to publish their reaction/source images to their own registry.Reaction SDK for Drasi
This library provides the building blocks and infrastructure to implement a Drasi Reaction in Node.js
Getting started
Install the package
Basic example
The following example simply breaks down and logs the various parts of the incoming change event from a Continuous Query.
A more advanced example
The following example illustrates