Crate memberlist_net
source ·Expand description
memberlist
’s Transport
layer based on TCP and UDP.
Modules§
- compressor
compression
Compress/decompress related. - Errors for the net transport.
- Abstractions for asynchronous programming.
- Re-exports
nodecraft
’s address resolver. - security
encryption
Encrypt/decrypt related. - Abstract the
StremLayer
forNetTransport
. - tests
test
Exports unit tests. - Transform its representation between structured and byte form.
Structs§
- An archived
Node
- Classless Inter-Domain Routing (CIDR) policy.
- General approach is to prefix all packets and streams with the same structure:
- A length-prefixed encoding
Wire
implementation - The net transport based on TCP/TLS and UDP
- Used to configure a net transport.
- Node is consist of id and address, which can be used as a identifier in a distributed system.
- A node address which supports both
domain:port
and socket address. - A unique string identifying a server for all time. The maximum length of an id is 512 bytes.
- The resolver for an archived
Node
- A producer for packets.
- A subscriber for packets.
- An error returned from
Receiver::recv()
. - An error returned from
Sender::send()
. - A producer for promised streams.
- A subscriber for promised streams.
Enums§
- Checksumer used to calculate checksums.
- Label error.
MaybeResolvedAddress
is used to represent an address that may or may not be resolved.- An error which can be returned when encoding/decoding a
NodeAddress
. - Errors that can occur when transforming an
NodeId
. - Error type returned when transforming a
Node
. - An error which can be returned when parsing a
NodeAddress
. - An error returned from
Receiver::try_recv()
. - An error returned from
Sender::try_send()
.
Traits§
- Address abstraction for distributed systems
- Used to resolve a [
SocketAddr
] from a node address in async style. - Things that are fast to clone in the context of an application such as Graph Node
- Id abstraction for distributed systems
- Ensures that the stream has timeout capabilities.
- Ensures that the stream has timeout capabilities.
- Ensures that the stream has timeout capabilities.
- The type can transform its representation between structured and byte form.
- Transport is used to abstract over communicating with other peers. The packet interface is assumed to be best-effort and the stream interface is assumed to be reliable.
- An error for the transport layer.
- The
Wire
trait for encoding and decoding of messages.
Functions§
- Returns producer and subscriber for packet.
- Returns producer and subscriber for promised stream.
Type Aliases§
NetTransport
based onasync-std
.NetTransport
based onsmol
.NetTransport
based ontokio
.