pub trait ExternalPlugin: Send + Sync {
    fn get_tcp_port(&self) -> i32;
    fn get_subscriptions(&self) -> Result<Vec<Box<dyn EventType>>, EngineError>;
    fn get_id(&self) -> Uuid;

    fn start(
        &self,
        pub_socket: Socket,
        sub_socket: Socket,
        external_socket: Socket
    ) -> Result<(), EngineError> { ... } }
Expand description

API for external plugins. External plugins are plugins that will run in a separate process from the main application process. In particular, all plugins written in languages other than Rust will be external plugins. These external plugins still need to be registered on the main application.

Required Methods

the tcp port on which the external plugin will retrieve and publish events.

Return the event subscriptions, as a vector of strings, that this plugin is interested in.

Returns the unique id for this plugin

Provided Methods

A Rust start function for external plugins. This function provides an API for the external plugin process to retrieve events and publish new events. It also supports commands, such as “quit” which will allow it to shut down. This API is exposed on a zmq REP socket.

Implementors