Crate memberlist_net

Source
Expand description

memberlist’s Transport layer based on TCP and UDP.

Modules§

error
Errors for the net transport.
futures
Abstractions for asynchronous programming.
resolver
Re-exports nodecraft’s address resolver.
stream_layer
Abstract the StremLayer for NetTransport.
teststest
Exports unit tests.
unimplemented
An unimplemented transport for testing purposes only.

Structs§

CIDRsPolicy
Classless Inter-Domain Routing (CIDR) policy.
Domain
A type which encapsulates a string that is a syntactically domain name.
DomainRef
A reference to a Domain that is guaranteed to be valid.
HostAddr
A host address which supports both domain:port and socket address.
HostAddrRef
A host address which supports both domain:port and socket address.
Label
General approach is to prefix all packets and streams with the same structure:
NetTransport
The net transport based on TCP/TLS and UDP
NetTransportOptions
Used to configure a net transport.
Node
Node is consist of id and address, which can be used as a identifier in a distributed system.
NodeId
A unique string identifying a server for all time. The maximum length of an id is 512 bytes.
NodeIdRef
A unique string identifying a server for all time. The maximum length of an id is 512 bytes.
Packet
The packet receives from the unreliable connection.
PacketProducer
A producer for packets.
PacketSubscriber
A subscriber for packets.
ParseDomainError
The provided input could not be parsed because it is not a syntactically-valid DNS Domain.
RecvError
An error returned from Receiver::recv().
SendError
An error returned from Sender::send().
StreamProducer
A producer for promised streams.
StreamSubscriber
A subscriber for promised streams.

Enums§

LabelError
Label error.
ParseHostAddrError
An error which can be returned when parsing a HostAddr.
ParseNodeIdError
Errors that can occur when transforming an NodeId.
TryRecvError
An error returned from Receiver::try_recv().
TrySendError
An error returned from Sender::try_send().

Traits§

Address
Address abstraction for distributed systems
AddressResolver
Used to resolve a [SocketAddr] from a node address in async style.
CheapClone
Things that are fast to clone in the context of an application.
Connection
The connection
Id
Id abstraction for distributed systems
Transport
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.
TransportError
An error for the transport layer.

Functions§

packet_stream
Returns producer and subscriber for packet.
promised_stream
Returns producer and subscriber for promised stream.

Type Aliases§

AsyncStdNetTransport
NetTransport based on async-std.
SmolNetTransport
NetTransport based on smol.
TokioNetTransport
NetTransport based on tokio.