/** * Network-related Constants * * Constants for network operations including IP addresses, * byte ranges, and process identifiers. * * @module network/constants */ /** * Network and connection constants */ export declare const NETWORK_CONSTANTS: { /** * Minimum value for an IPv4 octet (excluding 0 for first octet) */ readonly IPV4_OCTET_MIN: 1; /** * Maximum value for an IPv4 octet */ readonly IPV4_OCTET_MAX: 255; /** * Number of octets in an IPv4 address */ readonly IPV4_OCTET_COUNT: 4; /** * Maximum value for a random byte (256 exclusive) */ readonly RANDOM_BYTE_MAX: 256; /** * Default maximum process ID for testing */ readonly DEFAULT_PROCESS_ID_MAX: 10000; }; /** * Round-trip time (RTT) thresholds in milliseconds * Used to classify network latency quality */ export declare const RTT_THRESHOLDS: { /** * Excellent network latency - under 50ms */ readonly EXCELLENT: 50; /** * Good network latency - under 150ms */ readonly GOOD: 150; /** * Fair network latency - under 400ms */ readonly FAIR: 400; }; /** * Network speed thresholds in Mbps * Used to classify connection speed quality */ export declare const SPEED_THRESHOLDS: { /** * Excellent connection speed - 10+ Mbps */ readonly EXCELLENT: 10; /** * Good connection speed - 2+ Mbps */ readonly GOOD: 2; /** * Fair connection speed - 0.5+ Mbps */ readonly FAIR: 0.5; }; /** * Network quality scores (0-100 scale) * Used to quantify overall network performance */ export declare const NETWORK_SCORES: { /** * Excellent network quality score */ readonly EXCELLENT: 100; /** * Good network quality score */ readonly GOOD: 75; /** * Fair network quality score */ readonly FAIR: 50; /** * Poor network quality score */ readonly POOR: 25; /** * Offline - no network connection */ readonly OFFLINE: 0; }; /** * Network timeout constants in milliseconds * Used for request timeout configuration based on network quality */ export declare const NETWORK_TIMEOUTS: { /** * Fast network timeout - 15 seconds */ readonly FAST: 15000; /** * Medium network timeout - 30 seconds */ readonly MEDIUM: 30000; /** * Slow network timeout - 60 seconds */ readonly SLOW: 60000; /** * Very slow network timeout - 90 seconds */ readonly VERY_SLOW: 90000; /** * Offline timeout - 5 seconds (fail fast) */ readonly OFFLINE: 5000; }; /** * Cache TTL (Time-To-Live) constants in seconds * Used for cache expiration strategies */ export declare const CACHE_TTL: { /** * Short cache TTL - 5 minutes */ readonly SHORT: 300; /** * Medium cache TTL - 10 minutes */ readonly MEDIUM: 600; /** * Long cache TTL - 30 minutes */ readonly LONG: 1800; }; /** * Cache stale time constants in seconds * Used to determine when cached data is considered stale */ export declare const CACHE_STALE: { /** * Short stale time - 1 minute */ readonly SHORT: 60; /** * Medium stale time - 5 minutes */ readonly MEDIUM: 300; /** * Long stale time - 15 minutes */ readonly LONG: 900; }; /** * Request deduplication time constants in milliseconds * Used to prevent duplicate requests within time windows */ export declare const DEDUPE_TIME: { /** * Aggressive deduplication - 1 second */ readonly AGGRESSIVE: 1000; /** * Balanced deduplication - 2 seconds */ readonly BALANCED: 2000; /** * Conservative deduplication - 5 seconds */ readonly CONSERVATIVE: 5000; }; /** * Retry attempt constants * Number of retry attempts for failed requests */ export declare const RETRY_ATTEMPTS: { /** * Few retry attempts - 2 */ readonly FEW: 2; /** * Standard retry attempts - 3 */ readonly STANDARD: 3; /** * Many retry attempts - 5 */ readonly MANY: 5; }; /** * Retry delay constants in milliseconds * Initial delays between retry attempts */ export declare const RETRY_DELAYS: { /** * Short retry delay - 1 second */ readonly SHORT: 1000; /** * Long retry delay - 2 seconds */ readonly LONG: 2000; /** * Maximum retry delay - 30 seconds */ readonly MAX: 30000; }; /** * Retry backoff multiplier constants * Exponential backoff multipliers for retry delays */ export declare const RETRY_BACKOFF: { /** * Small backoff multiplier - 1.5x */ readonly SMALL: 1.5; /** * Medium backoff multiplier - 2x */ readonly MEDIUM: 2; /** * Large backoff multiplier - 2.5x */ readonly LARGE: 2.5; }; /** * Batch size constants * Number of items to process in a single batch */ export declare const BATCH_SIZES: { /** * Huge batch size - 50 items */ readonly HUGE: 50; /** * Large batch size - 25 items */ readonly LARGE: 25; /** * Medium batch size - 10 items */ readonly MEDIUM: 10; /** * Small batch size - 5 items */ readonly SMALL: 5; /** * No batching - 0 items */ readonly NONE: 0; }; /** * Page size constants * Number of items per page for pagination */ export declare const PAGE_SIZES: { /** * Huge page size - 100 items */ readonly HUGE: 100; /** * Large page size - 50 items */ readonly LARGE: 50; /** * Medium page size - 25 items */ readonly MEDIUM: 25; /** * Small page size - 10 items */ readonly SMALL: 10; /** * No pagination - 0 items */ readonly NONE: 0; }; /** * Type for network constant values */ export type NetworkConstant = (typeof NETWORK_CONSTANTS)[keyof typeof NETWORK_CONSTANTS]; /** * Type for RTT threshold values */ export type RTTThreshold = (typeof RTT_THRESHOLDS)[keyof typeof RTT_THRESHOLDS]; /** * Type for speed threshold values */ export type SpeedThreshold = (typeof SPEED_THRESHOLDS)[keyof typeof SPEED_THRESHOLDS]; /** * Type for network score values */ export type NetworkScore = (typeof NETWORK_SCORES)[keyof typeof NETWORK_SCORES]; /** * Type for network timeout values */ export type NetworkTimeout = (typeof NETWORK_TIMEOUTS)[keyof typeof NETWORK_TIMEOUTS]; /** * Type for cache TTL values */ export type CacheTTL = (typeof CACHE_TTL)[keyof typeof CACHE_TTL]; /** * Type for cache stale values */ export type CacheStale = (typeof CACHE_STALE)[keyof typeof CACHE_STALE]; /** * Type for dedupe time values */ export type DedupeTime = (typeof DEDUPE_TIME)[keyof typeof DEDUPE_TIME]; /** * Type for retry attempt values */ export type RetryAttempt = (typeof RETRY_ATTEMPTS)[keyof typeof RETRY_ATTEMPTS]; /** * Type for retry delay values */ export type RetryDelay = (typeof RETRY_DELAYS)[keyof typeof RETRY_DELAYS]; /** * Type for retry backoff values */ export type RetryBackoff = (typeof RETRY_BACKOFF)[keyof typeof RETRY_BACKOFF]; /** * Type for batch size values */ export type BatchSize = (typeof BATCH_SIZES)[keyof typeof BATCH_SIZES]; /** * Type for page size values */ export type PageSize = (typeof PAGE_SIZES)[keyof typeof PAGE_SIZES]; //# sourceMappingURL=constants.d.ts.map