Expand description
Network Utilities
This module provides common utility functions for network operations.
Functionsยง
- exponential_
backoff - Calculate exponential backoff duration
- format_
bandwidth - Format bytes per second in human-readable format (B/s, KB/s, MB/s, GB/s)
- format_
bytes - Format bytes in human-readable format (B, KB, MB, GB, TB)
- format_
duration - Format duration in human-readable format
- is_
local_ addr - Check if a multiaddress is a local address (loopback or link-local)
- is_
public_ addr - Check if a multiaddress is a public address
- jittered_
backoff - Calculate jittered exponential backoff duration
- moving_
average - Calculate moving average
- parse_
multiaddr - Parse a multiaddress string
- parse_
multiaddrs - Parse multiple multiaddress strings
- peers_
match - Check if two peer IDs match
- percentage
- Calculate percentage with proper rounding
- truncate_
peer_ id - Truncate a peer ID for display purposes
- validate_
alpha - Validate alpha value for exponential moving average