pub enum MockEvent {
MockCreated {
mock: MockConfig,
timestamp: String,
},
MockUpdated {
mock: MockConfig,
timestamp: String,
},
MockDeleted {
id: String,
timestamp: String,
},
StatsUpdated {
stats: ServerStats,
timestamp: String,
},
Connected {
message: String,
timestamp: String,
},
StateMachineUpdated {
resource_type: String,
state_machine: StateMachine,
timestamp: String,
},
StateMachineDeleted {
resource_type: String,
timestamp: String,
},
StateInstanceCreated {
resource_id: String,
resource_type: String,
initial_state: String,
timestamp: String,
},
StateTransitioned {
resource_id: String,
resource_type: String,
from_state: String,
to_state: String,
state_data: HashMap<String, Value>,
timestamp: String,
},
StateInstanceDeleted {
resource_id: String,
resource_type: String,
timestamp: String,
},
}Expand description
Events that can be broadcasted to WebSocket clients
Variants§
MockCreated
Mock was created
Fields
§
mock: MockConfigThe created mock configuration
MockUpdated
Mock was updated
Fields
§
mock: MockConfigThe updated mock configuration
MockDeleted
Mock was deleted
StatsUpdated
Server statistics changed
Fields
§
stats: ServerStatsUpdated server statistics
Connected
Connection established confirmation
Fields
StateMachineUpdated
State machine was created or updated
Fields
§
state_machine: StateMachineThe state machine definition
StateMachineDeleted
State machine was deleted
Fields
StateInstanceCreated
State instance was created
Fields
StateTransitioned
State transition occurred
Fields
StateInstanceDeleted
State instance was deleted
Implementations§
Source§impl MockEvent
impl MockEvent
Sourcepub fn mock_created(mock: MockConfig) -> Self
pub fn mock_created(mock: MockConfig) -> Self
Create a mock created event
Sourcepub fn mock_updated(mock: MockConfig) -> Self
pub fn mock_updated(mock: MockConfig) -> Self
Create a mock updated event
Sourcepub fn mock_deleted(id: String) -> Self
pub fn mock_deleted(id: String) -> Self
Create a mock deleted event
Sourcepub fn stats_updated(stats: ServerStats) -> Self
pub fn stats_updated(stats: ServerStats) -> Self
Create a stats updated event
Sourcepub fn state_machine_updated(
resource_type: String,
state_machine: StateMachine,
) -> Self
pub fn state_machine_updated( resource_type: String, state_machine: StateMachine, ) -> Self
Create a state machine updated event
Sourcepub fn state_machine_deleted(resource_type: String) -> Self
pub fn state_machine_deleted(resource_type: String) -> Self
Create a state machine deleted event
Sourcepub fn state_instance_created(
resource_id: String,
resource_type: String,
initial_state: String,
) -> Self
pub fn state_instance_created( resource_id: String, resource_type: String, initial_state: String, ) -> Self
Create a state instance created event
Sourcepub fn state_transitioned(
resource_id: String,
resource_type: String,
from_state: String,
to_state: String,
state_data: HashMap<String, Value>,
) -> Self
pub fn state_transitioned( resource_id: String, resource_type: String, from_state: String, to_state: String, state_data: HashMap<String, Value>, ) -> Self
Create a state transitioned event
Sourcepub fn state_instance_deleted(
resource_id: String,
resource_type: String,
) -> Self
pub fn state_instance_deleted( resource_id: String, resource_type: String, ) -> Self
Create a state instance deleted event
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MockEvent
impl<'de> Deserialize<'de> for MockEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MockEvent
impl RefUnwindSafe for MockEvent
impl Send for MockEvent
impl Sync for MockEvent
impl Unpin for MockEvent
impl UnwindSafe for MockEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request