Expand description
Message and MessageHandler
Re-exports§
pub use handlers::storage::ChordStorageInterface;pub use handlers::storage::ChordStorageInterfaceCacheChecker;pub use handlers::subring::SubringInterface;pub use handlers::HandleMsg;pub use handlers::MessageHandler;pub use types::*;
Modules§
- e2e
- End-to-end ElGamal encryption for byte payloads.
- handlers
- This module implemented message handler of rings network.
- types
- This module defines various message structures in the Rings network. Most of the messages follow the Ping/Pong pattern, where there is a one-to-one correspondence between them, such as xxxSend and xxxReport messages.
Structs§
- Encoded
- Message
Payload MessagePayloadis used to transmit data between nodes. The data should be packed by Transaction.- Message
Relay - MessageRelay guide message passing on rings network by relay.
- Message
Verification - Message Verification is based on session, and sig. it also included ttl time and created ts.
- Transaction
- All messages transmitted in RingsNetwork should be wrapped by
Transaction. It additionally offer destination, tx_id and verification.
Traits§
- Decoder
- Encoder
- Message
Verification Ext - This trait helps a struct with
MessageVerificationfield toverifyitself. It also provides asignermethod to let receiver know who sent the message. - Payload
Sender - Trait of PayloadSender
Functions§
- decode_
gzip_ data - Decompresses the given gzip-compressed byte slice and returns the decompressed byte slice.
- encode_
data_ gzip - Compresses the given data byte slice using the gzip algorithm with the specified compression level.
- from_
gzipped_ data - From gzip data to deserialized
- gzip_
data - Serializes the given data using JSON and compresses it with gzip using the specified compression level.