Port management utilities for development environment.
Provides port conflict resolution, environment detection, and intelligent port allocation for different development scenarios.
Port management utilities for development environment. Provides port conflict resolution, environment detection, and intelligent port allocation for different development scenarios.
(allocate-port requested-port config)Allocate a port using intelligent strategy based on environment.
Args: requested-port: The preferred port number config: Configuration map (may contain :port-range)
Returns: Map with :port (allocated port) and :message (allocation info)
Allocate a port using intelligent strategy based on environment. Args: requested-port: The preferred port number config: Configuration map (may contain :port-range) Returns: Map with :port (allocated port) and :message (allocation info)
(development-environment?)Detect if the application is running in development mode.
Returns: true if in development environment, false otherwise
Detect if the application is running in development mode. Returns: true if in development environment, false otherwise
(docker-environment?)Detect if the application is running in a Docker container.
Returns: true if running in Docker, false otherwise
Detect if the application is running in a Docker container. Returns: true if running in Docker, false otherwise
(find-available-port start-port)(find-available-port start-port end-port)Find an available port within a specified range.
Args: start-port: Starting port number (inclusive) end-port: Ending port number (inclusive), defaults to start-port + 99
Returns: An available port number within the range
Throws: ExceptionInfo if no port is available in the range
Find an available port within a specified range. Args: start-port: Starting port number (inclusive) end-port: Ending port number (inclusive), defaults to start-port + 99 Returns: An available port number within the range Throws: ExceptionInfo if no port is available in the range
(log-port-allocation requested-port allocated-port config service-name)Log port allocation information for debugging.
Args:
requested-port: Originally requested port
allocated-port: Actually allocated port
config: Configuration map
service-name: Name of the service (e.g., 'HTTP Server')
Log port allocation information for debugging. Args: requested-port: Originally requested port allocated-port: Actually allocated port config: Configuration map service-name: Name of the service (e.g., 'HTTP Server')
(port-available? port)Check if a port is available for binding.
Args: port: Port number to check
Returns: true if port is available, false otherwise
Check if a port is available for binding. Args: port: Port number to check Returns: true if port is available, false otherwise
(suggest-port-strategy requested-port config)Suggest port allocation strategy based on environment.
Args: requested-port: The originally requested port config: Configuration map with potential port-range
Returns: Map with :strategy, :port-range, and :message
Suggest port allocation strategy based on environment. Args: requested-port: The originally requested port config: Configuration map with potential port-range Returns: Map with :strategy, :port-range, and :message
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |