rasa/core/broker.py
def from_endpoint_config(broker_config: Optional[EndpointConfig]
                         ) -> Optional['EventChannel']:
    """Instantiate an event channel based on its configuration."""

    if broker_config is None:
        return None
    elif broker_config.type == 'pika' or broker_config.type is None:
        return PikaProducer.from_endpoint_config(broker_config)
    elif broker_config.type == 'file':
        return FileProducer.from_endpoint_config(broker_config)
    elif broker_config.type == 'kafka':
        return FileProducer.from_endpoint_config(broker_config)
    else:
        return load_event_channel_from_module_string(broker_config)
Instantiate an event channel based on its configuration.
Instantiate an event channel based on its configuration.
Instantiate an event channel based on its configuration .
def from_endpoint_config(broker_config: Optional[EndpointConfig]
                         ) -> Optional['EventChannel']:
    if broker_config is None:
        return None
    elif broker_config.type == 'pika' or broker_config.type is None:
        return PikaProducer.from_endpoint_config(broker_config)
    elif broker_config.type == 'file':
        return FileProducer.from_endpoint_config(broker_config)
    elif broker_config.type == 'kafka':
        return FileProducer.from_endpoint_config(broker_config)
    else:
        return load_event_channel_from_module_string(broker_config)
def from_endpoint_config ( broker_config : Optional [ EndpointConfig ] ) -> Optional [ 'EventChannel' ] : if broker_config is None : return None elif broker_config . type == 'pika' or broker_config . type is None : return PikaProducer . from_endpoint_config ( broker_config ) elif broker_config . type == 'file' : return FileProducer . from_endpoint_config ( broker_config ) elif broker_config . type == 'kafka' : return FileProducer . from_endpoint_config ( broker_config ) else : return load_event_channel_from_module_string ( broker_config )
Instantiate an event channel based on its configuration.
Instantiate an event channel based on its configuration .
"""Instantiate an event channel based on its configuration."""
broker_config
Optional[EndpointConfig]