forked from openebs/mayastor-control-plane
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(bors): merge pull request openebs#714
714: feat(eventing): state change events for node r=datacore-vvarakantham a=datacore-vvarakantham Added node state change events. Co-authored-by: Vandana Varakantham <[email protected]>
- Loading branch information
Showing
6 changed files
with
53 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use events_api::event::{EventAction, EventMessage, EventMeta}; | ||
|
||
/// Event trait definition for creating events. | ||
pub trait Event { | ||
/// Create event message. | ||
fn event(&self, event_action: EventAction) -> EventMessage; | ||
} | ||
|
||
/// Event trait definition for creating events and adding meta data. | ||
pub trait EventWithMeta { | ||
/// Create event message with meta data. | ||
fn event(&self, action: EventAction, meta: EventMeta) -> EventMessage; | ||
} | ||
|
||
/// A trait for generating event metadata. | ||
pub trait EventMetaGen { | ||
/// Create metadata to be included with the event. | ||
fn meta(&self) -> EventMeta; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters