Module rings_node::prelude::message

source ·
Expand description

Message and MessageHandler

Structs

MessageType report to origin that already connected.
MessageType report to origin with own transport_uuid and handshake_info.
MessageType use to ask for connection, send to remote with transport_uuid and handshake_info.
MessageType use to customize message, will be handle by custom_message method.
MessageType use to report origin node with report message.
MessageType use to find successor in a chord ring.
MessageType report to origin found virtual node.
MessageType use to join chord ring, add did into fingers table.
MessageType use to leave chord ring.
MessageHandler will manage resources.
MessagePayload with sequence and verification, contain MessageRelay.
MessageRelay guide message passing on rings network by relay.
MessageType contains multi messages.
MessageType report to origin node.
MessageType use to notify predecessor, ask for update finger tables.
MessageType use to search virtual node.
MessageType after FindSuccessorSend and syncing data.

Enums

MessageType enum handle when meet the last node.
MessageType enum Report contain FindSuccessorSend.
A enum about Encrypted and Plain types.
A collection MessageType use for unified management.
MessageRelay divides messages into two types by method: SEND and REPORT. And will enable different behaviors when handling SEND and REPORT messages.

Traits

ChordStorageInterface should imply necessary method for DHT storage
Generic trait for handle message ,inspired by Actor-Model.
Trait of message callback.
SubringInterface should imply necessary operator for DHT Subring

Functions

Type Definitions

Boxed Callback, for non-wasm, it should be Sized, Send and Sync.
Boxed Validator