Expand description
Types used by the memberlist crate.
Re-exports§
pub use bytes;pub use checksum::*;crc32orxxhash32orxxhash64orxxhash3ormurmur3pub use compression::*;zstdorlz4orbrotliorsnappypub use encryption::*;encryption
Modules§
- checksum
crc32orxxhash32orxxhash64orxxhash3ormurmur3 - Checksum related types.
- compression
zstdorlz4orbrotliorsnappy - Compression related types.
- either
- The enum
Eitherwith variantsLeftandRightis a general purpose sum type with two cases. - encryption
encryption - Encryption related types.
- utils
- Utils for protobuf-like encoding/decoding
Macros§
- smallvec_
wrapper - Wraps a
SmallVecwith a newtype.
Structs§
- Ack
- Ack response is sent for a ping
- AckRef
- The reference to an
Ackmessage - Addr
Parse Error - An error which can be returned when parsing an IP network address.
- Alive
- Alive message
- Alive
Ref - The reference type of
Alive. - CIDRs
Policy - Classless Inter-Domain Routing (CIDR) policy.
- Checksum
Hint crc32orxxhash32orxxhash64orxxhash3ormurmur3 - The hint of how checksum is encoded to the buffer.
- Compress
Hint zstdorlz4orbrotliorsnappy - The hint of how the payload is compressed in the buffer.
- Dead
- Dead message
- Encryption
Hint encryption - The hint of how encrypted payload.
- Error
Response - Error response from the remote peer
- Error
Response Ref - Reference type of error response from the remote peer
- Indirect
Ping - IndirectPing is sent to a target to check if it is alive
- Ipv4
Addr Range - An
Iteratorover a range of IPv4 addresses. - Ipv4Net
- An IPv4 network address.
- Ipv4
Subnets - An
Iteratorthat generates IPv4 network addresses. - Ipv6
Addr Range - An
Iteratorover a range of IPv6 addresses. - Ipv6Net
- An IPv6 network address.
- Ipv6
Subnets - An
Iteratorthat generates IPv6 network addresses. - Label
- General approach is to prefix all packets and streams with the same structure:
- Large
Meta - Invalid meta error.
- Large
Vec - A big vec which can inline 16 elements on stack.
- Medium
Vec - A medium vec which can inline 8 elements on stack.
- Messages
Decoder - A zero-copy decoder for
Messages. - Messages
Decoder Iter - An iterator to yield the messages.
- Meta
- The metadata of a node in the cluster.
- Metric
Labels metrics - A vector of
Labels. - Nack
- Nack response is sent for an indirect ping when the pinger doesn’t hear from the ping-ee within the configured timeout. This lets the original node know that the indirect ping attempt happened but didn’t succeed.
- Node
stdoralloc - Node is consist of id and address, which can be used as a identifier in a distributed system.
- NodeId
stdoralloc - A unique string identifying a server for all time. The maximum length of an id is 512 bytes.
- Node
State - Represents a node in the cluster
- Node
State Ref - The reference type for
NodeState. - OneOr
More - A tiny vec which can inline 1 element on stack.
- Parse
Domain Error ( stdoralloc) andhostaddr - The provided input could not be parsed because it is not a syntactically-valid DNS Domain.
- Payload
- A payload can be sent over the transport.
- Ping
- Ping is sent to a target to check if it is alive
- Prefix
LenError - An error which can be returned when the prefix length is invalid.
- Proto
Decoder - A protocol decoder.
- Proto
Encoder - The encoder of messages
- Proto
Hint - The hint for
ProtoEncoderto encode the messages. - Push
Node State - Push node state is the state push to the remote server.
- Push
Node State Ref - Push node state is the state push to the remote server.
- Push
Pull - Push pull message.
- Push
Pull Ref - The reference type of Push pull message.
- Repeated
Decoder - An iterator with can yields the reference type of
D - Repeated
Decoder Iter - An iterator over the
RepeatedDecoderin the collection. - Small
Vec - A small vec which can inline 4 elements on stack.
- Suspect
- Suspect message
- TinyVec
- A tiny vec which can inline 2 elements on stack.
- TriVec
- A vec which can inline 3 elements on stack.
- Tuple
Encoder - The encoder for a tuple of two data types.
- XLarge
Vec - A xlarge vec which can inline 32 elements on stack.
- XXLarge
Vec - A xxlarge vec which can inline 64 elements on stack.
- XXXLarge
Vec - A xxxlarge vec which can inline 128 elements on stack.
Enums§
- Decode
Error - A message decoding error.
- Delegate
Version - Delegate version
- Encode
Error - A data encoding error
- IpAddr
Range - An
Iteratorover a range of IP addresses, either IPv4 or IPv6. - IpNet
- An IP network address, either IPv4 or IPv6.
- IpSubnets
- An
Iteratorthat generates IP network addresses, either IPv4 or IPv6. - Label
Error - Label error.
- Maybe
Resolved Address MaybeResolvedAddressis used to represent an address that may or may not be resolved.- Message
- Request to be sent to the Raft node.
- Message
Ref - The reference type of the
Messageenum. - Message
Type - Parse
Host Addr Error ( stdoralloc) andhostaddr - An error which can be returned when parsing a
HostAddr. - Parse
Label Error - Parse label error.
- Parse
Node IdError stdoralloc - Errors that can occur when transforming an
NodeId. - Proto
Decoder Error - An error that can occur during encoding.
- Proto
Encoder Error - The errors may occur during encoding.
- Protocol
Version - Protocol version
- State
- State for the memberlist
- Wire
Type - A wire type used in Protobuf-like encoding/decoding.
Traits§
- Cheap
Clone stdoralloc - Things that are fast to clone in the context of an application.
- Data
- The memberlist data can be transmitted through the network.
- DataRef
- The reference type of the data.
- IpAdd
- Provides a
saturating_add()method forIpv4AddrandIpv6Addr. - IpBit
And - Provides a
bitand()method forIpv4AddrandIpv6Addr. - IpBitOr
- Provides a
bitor()method forIpv4AddrandIpv6Addr. - IpSub
- Provides a
saturating_sub()method forIpv4AddrandIpv6Addr. - Proto
Reader - The reader used in the memberlist proto
- Proto
Writer - The writer used in the memberlist proto
Functions§
- ip_
mask_ to_ prefix - Converts a
IpAddrnetwork mask into a prefix. - ipv4_
mask_ to_ prefix - Converts a
Ipv4Addrnetwork mask into a prefix. - ipv6_
mask_ to_ prefix - Converts a
Ipv6Addrnetwork mask into a prefix.
Type Aliases§
- Domain
( stdoralloc) andhostaddr - Domain type alias
- Domain
Buffer ( stdoralloc) andhostaddr - Domain type alias
- Host
Addr ( stdoralloc) andhostaddr - Host address type alias
- Host
Addr Buffer ( stdoralloc) andhostaddr - Host address type alias