Skip to main content

Module target

Module target 

Source
Expand description

Target resolution - Convert user input to processes

Targets can be:

  • :port - Process listening on this port
  • pid - Process with this PID (numeric)
  • name - Processes matching this name

Structs§

Resolved
What resolving several targets came to

Enums§

TargetType
Resolved target type

Functions§

comma_notice
The deprecation notice for comma-separated targets, if the command line used any, or None.
find_ports_for_pid
Find all ports a process is listening on
flatten_targets
Split every target argument the user typed into individual targets
parse_target
Parse a target string and determine its type
parse_targets
Split comma-separated targets into individual target strings
resolve_target
Resolve a target to processes; mode says how a name is compared
resolve_targets
Resolve multiple targets, deduplicating by PID
resolve_targets_excluding_self
Resolve multiple targets, excluding the current process (self)
validate_target_arg
clap value parser for target arguments: a target that starts with ‘:’ must be a port from 1 to 65535. Without this, “:70000” fell through to a name search and reported “not found” instead of a typo.