Liking cljdoc? Tell your friends :D

wagoe.platform.shell.utils.port-manager

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.
raw docstring

allocate-portclj

(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)
sourceraw docstring

development-environment?clj

(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
sourceraw docstring

docker-environment?clj

(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
sourceraw docstring

find-available-portclj

(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
sourceraw docstring

log-port-allocationclj

(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')
sourceraw docstring

port-available?clj

(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
sourceraw docstring

suggest-port-strategyclj

(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
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close