Skip to main content

Module endpoint

Module endpoint 

Source
Expand description

The Enpoint API.

This API is used to start and manage a new endpoint, aka service, and to publish on the EDA Bus.

§Quickstart

use eventail::endpoint::{Config, Endpoint};

#[tokio::main]
async fn main() {

    let config = Config {
        prefetch_count: 3,
        logical_service: String::from("my_service_name"),
        hosts: vec![String::from("amqp://localhost")],
        event_subscriptions: vec![],
        command_subscriptions: vec![],
        configuration_subscriptions: vec![],
    };
    let (endpoint, _client_rx) = Endpoint::new(config);
    // do something
    // ...
    endpoint
        .shutdown()
        .await
        .expect("problem when shutting down the service!");
}

Re-exports§

pub use super::Delivery;

Structs§

Config
Configure the Enpoint.
Endpoint
The master endpoint API.
EndpointHandle
The endpoint handle implements the EDA API

Enums§

ClientMessage
Events sent by the endpoint and consumed by the user code.
Criticity
Syslog Criticity level
Error

Type Aliases§

ExtraFields