Struct ockam_core::flow_control::FlowControls
source · pub struct FlowControls { /* private fields */ }
Expand description
Storage for all Flow Control-related data
Implementations§
source§impl FlowControls
impl FlowControls
source§impl FlowControls
impl FlowControls
sourcepub fn generate_flow_control_id() -> FlowControlId
pub fn generate_flow_control_id() -> FlowControlId
Generate a fresh random FlowControlId
sourcepub fn add_consumer(
&self,
address: impl Into<Address>,
flow_control_id: &FlowControlId
)
pub fn add_consumer( &self, address: impl Into<Address>, flow_control_id: &FlowControlId )
Mark that given Address
is a Consumer for a Producer with the given FlowControlId
sourcepub fn add_producer(
&self,
address: impl Into<Address>,
flow_control_id: &FlowControlId,
spawner_flow_control_id: Option<&FlowControlId>,
additional_addresses: Vec<Address>
)
pub fn add_producer( &self, address: impl Into<Address>, flow_control_id: &FlowControlId, spawner_flow_control_id: Option<&FlowControlId>, additional_addresses: Vec<Address> )
Mark that given Address
is a Producer for to the given FlowControlId
Also, mark that this Producer was spawned by a Spawner
with the given spawner FlowControlId
(if that’s the case).
sourcepub fn add_spawner(
&self,
address: impl Into<Address>,
flow_control_id: &FlowControlId
)
pub fn add_spawner( &self, address: impl Into<Address>, flow_control_id: &FlowControlId )
Mark that given Address
is a Spawner for to the given FlowControlId
sourcepub fn get_consumers_info(
&self,
flow_control_id: &FlowControlId
) -> ConsumersInfo
pub fn get_consumers_info( &self, flow_control_id: &FlowControlId ) -> ConsumersInfo
Get known Consumers for the given FlowControlId
sourcepub fn get_flow_control_with_spawner(
&self,
address: &Address
) -> Option<FlowControlId>
pub fn get_flow_control_with_spawner( &self, address: &Address ) -> Option<FlowControlId>
Get FlowControlId
for which given Address
is a Spawner
sourcepub fn get_flow_control_with_producer(
&self,
address: &Address
) -> Option<ProducerInfo>
pub fn get_flow_control_with_producer( &self, address: &Address ) -> Option<ProducerInfo>
Get ProducerInfo
for which given Address
is a Producer
sourcepub fn find_flow_control_with_producer_address(
&self,
address: &Address
) -> Option<ProducerInfo>
pub fn find_flow_control_with_producer_address( &self, address: &Address ) -> Option<ProducerInfo>
Get ProducerInfo
for which given Address
is a Producer or is an additional Address
for that Producer (e.g. Encryptor address for its Decryptor, or TCP Sender for its TCP Receiver)
source§impl FlowControls
impl FlowControls
sourcepub fn cleanup_address(&self, address: &Address)
pub fn cleanup_address(&self, address: &Address)
Clean everything that is possible after Address
no longer exists
source§impl FlowControls
impl FlowControls
sourcepub fn debug_denied_message(
&self,
source: &Address,
source_flow_control_id: &FlowControlId,
source_spawner_flow_control_id: &Option<FlowControlId>,
destination: &Address
)
pub fn debug_denied_message( &self, source: &Address, source_flow_control_id: &FlowControlId, source_spawner_flow_control_id: &Option<FlowControlId>, destination: &Address )
Prints debug information to investigate why message was not allowed to pass through
Trait Implementations§
source§impl Clone for FlowControls
impl Clone for FlowControls
source§fn clone(&self) -> FlowControls
fn clone(&self) -> FlowControls
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more