[][src]Enum cerk::kernel::BrokerEvent

pub enum BrokerEvent {
    ScheduleInternalServer(ScheduleInternalServerStatic),
    InternalServerScheduled(InternalServerIdBoxedSender),
    Init,
    ConfigUpdated(ConfigInternalServerId),
    IncomingCloudEvent(IncomingCloudEvent),
    RoutingResult(RoutingResult),
    OutgoingCloudEvent(OutgoingCloudEvent),
    OutgoingCloudEventProcessed(OutgoingCloudEventProcessed),
    IncomingCloudEventProcessed(CloudEventMessageRoutingIdProcessingResult),
    Batch(Vec<BrokerEvent>),
    HealthCheckRequest(HealthCheckRequest),
    HealthCheckResponse(HealthCheckResponse),
}

Representation of all events which are exchanged between the components

Variants

ScheduleInternalServer(ScheduleInternalServerStatic)

The ScheduleInternalServer event tells the Scheduler to schedule a new internal server. One event is produced by the Kernel for each component.

Arguments

  • InternalServerId - id of the component that should be scheduled
  • InternalServerFn - start function of the component that should be scheduled
InternalServerScheduled(InternalServerIdBoxedSender)

The InternalServerScheduled event indicates to the receiver that a new internal server was successfully scheduled. The event gets produced by the scheduler after a component was scheduled (because of a ScheduleInternalServer event). The receiver is the Kernel.

Arguments

  • InternalServerId - id of the component that was scheduled
  • BoxedSender - channel inbox of the scheduled component
Init

The Init event indicates to the receiver that it should start interacting with the outside world. The event is produced by the Kernel when all components are scheduled.

ConfigUpdated(ConfigInternalServerId)

The ConfigUpdated event indicates to the receiver that the config has changed and a configuration update should be applied. The event is produced by the router and send to the Kernel and then to the component.

Arguments

  • Config - the new configurations
  • InternalServerId - the component id for which the configurations are meant
IncomingCloudEvent(IncomingCloudEvent)

The IncomingCloudEvent event indicates to the receiver that a new CloudEvent has been received from the outside world. The event is produced by an input port and is sent to the Kernel. The Kernel sends the same event to the router.

RoutingResult(RoutingResult)

The RoutingResult is the result of a routing from one IncomingCloudEvent. The event is sent from the router to the kernel and there forwarded as OutgoingCloudEvent to the ports.

The RoutingResult doesn't have to be sent if there are no destinations (Vec<OutgoingCloudEvent>.len() == 0)

OutgoingCloudEvent(OutgoingCloudEvent)

The OutgoingCloudEvent event indicates to the receiver that a CloudEvent has been routed and is ready to be forwarded to the outside world. The event is created by the router, send to the Kernel (in a badge as RoutingResult) and then to the output port(s). One event for every output port which should forward the data is created.

OutgoingCloudEventProcessed(OutgoingCloudEventProcessed)

The OutgoingCloudEvent was processed. The OutgoingCloudEventProcessed notifies the kernel about the end of the processing and indicates whether the outcome was successful. This response is only used if the CloudEventRoutingArgs in the OutgoingCloudEvent event indicates that a response is used (CloudEventRoutingArgs.delivery_guarantee.requires_acknowledgment()).

IncomingCloudEventProcessed(CloudEventMessageRoutingIdProcessingResult)

The IncomingCloudEvent was processed. The IncomingCloudEventProcessed notifies the receiver port that the routing is completed and a response to the sender can be sent. This response is only used if the CloudEventRoutingArgs in the IncomingCloudEvent event indicates that a response is used (CloudEventRoutingArgs.delivery_guarantee.requires_acknowledgment()).

Arguments

  • CloudEventMessageRoutingId - the unique identifier of the CloudEvent routing attempt
  • OutgoingProcessingResult - result of the processing, was the processing successful? Error?

The Batch event can be used to make sure a collection of events are processed by the MicroKernel in one batch to prevent race conditions.

Arguments

  • Vec<BrokerEvent> - a vector of BrokerEvent
HealthCheckRequest(HealthCheckRequest)

A health check port sends HealthCheckRequest to some components, they should response with HealthCheckResponse

HealthCheckResponse(HealthCheckResponse)

response for HealthCheckRequest, should go to a health check component

Trait Implementations

impl Display for BrokerEvent[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,