Expand description
Common utility functions
These utilities provide defensive helper functions used throughout the Air library for validation, ID generation, timestamp handling, and common operations with proper error handling.
Functionsยง
-
Calculate
Backoff Delay - Calculate exponential backoff delay
-
Current
Timestamp - Get current timestamp in milliseconds since UNIX epoch
-
Current
Timestamp Seconds - Get current timestamp in seconds since UNIX epoch
-
Format
Bytes - Format bytes as human-readable size
-
Generate
Request Id - Generate a unique request ID
-
Generate
Request IdWith Prefix - Generate a unique request ID with a prefix
-
Parse
Duration ToMillis - Parse duration string to milliseconds
-
Sanitize
ForLogging - Sanitize a string for logging
-
Timestamp
ToIS O8601 - Convert timestamp millis to ISO 8601 string
-
Validate
File Path - Validate file path security
-
Validate
Port - Validate port number
-
Validate
String Length - Validate string length
-
Validate
Url - Validate URL format