Struct moleculer::service::Context [−][src]
pub struct Context<T> {}Show 14 fields
pub id: String, pub broker: ServiceBroker, pub node_id: String, pub action: Option<String>, pub event_name: Option<String>, pub event_type: Option<EventType>, pub event_groups: Vec<String>, pub caller: Option<String>, pub request_id: Option<String>, pub parent_id: Option<String>, pub params: Value, pub meta: Value, pub locals: Option<Value>, pub level: i32, // some fields omitted
Expand description
Context is available in all callbacks.
In an action context you can send a response to the request using reply()
In all contexts emit()
, broadcast()
and
call()
are available
Fields
id: String
broker: ServiceBroker
node_id: String
action: Option<String>
event_name: Option<String>
event_type: Option<EventType>
event_groups: Vec<String>
caller: Option<String>
request_id: Option<String>
parent_id: Option<String>
params: Value
meta: Value
locals: Option<Value>
level: i32