-
Notifications
You must be signed in to change notification settings - Fork 32
Event Processor SDK #48
base: main
Are you sure you want to change the base?
Conversation
This RFC proposes extensions to the Sawtooth SDK's to support event processing. These events are emitted by the validator on block commits and can be subscribed to via client messages. These SDK extensions propose a simplified abstraction on top of these client messages in order to provide a simple model for handling the events. This API is akin to the Transaction Handler/Transaction Processor API's. Signed-off-by: Peter Schwarz <[email protected]>
{ ... } | ||
|
||
impl EventProcessor { | ||
pub fn new(validator_endpoint: String) -> Self |
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.
[nitpick]: Missing {} has broken the syntax highlighter
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.
fixed
-> Self | ||
{ ... } | ||
|
||
fn with_regex_filter( |
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.
[Thinking out loud]: Can this be trait object passed to a function like "with_filter()", where is either regex or simple or something else coming up later.
Fix code snippet for proper syntax highlighting. Signed-off-by: Peter Schwarz <[email protected]>
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.
I assume this documents existing event handling. I see where you describe creating a subscription, then you jump to event handling. Missing is any description of how/where to send the subscription, and an API to listen to the event subscription response.
A Rust example would be nice.
This RFC proposes extensions to the Sawtooth SDK's to support event
processing. These events are emitted by the validator on block commits
and can be subscribed to via client messages.
These SDK extensions propose a simplified abstraction on top of these
client messages in order to provide a simple model for handling the
events. This API is akin to the Transaction Handler/Transaction
Processor API's.
Signed-off-by: Peter Schwarz [email protected]