Both client applets duplicated the step from parsed arguments to a runnable managed setup: target specs, managed target preparation, a ClientConfig built from an arbitrary primary target, pacing conversion, and an identical ManagedClientConfig skeleton with its own copy of the event-capacity constant. The primary-target step was the worst of it, since the managed driver replaces server_addr per target, so the address the applets went out of their way to find was immediately discarded. shared::client::prepare now performs that step once: it validates the target set first, then returns the validated targets, one target-free ClientConfig template, and the pacing, with managed_config()/managed_targets() for the driver. CommonClientArgs::to_client_config no longer takes a server address. Applet-specific semantics are unchanged: each command keeps its own duration default and help text, the client still accepts no target for --list-columns, and the TUI still rejects an empty target list at parse time.
18 lines
617 B
Rust
18 lines
617 B
Rust
pub mod args;
|
|
pub mod config;
|
|
pub mod prepare;
|
|
pub mod session;
|
|
pub mod targets;
|
|
|
|
pub use args::{
|
|
parse_dscp, parse_duration, parse_length, parse_server_fill, parse_test_duration, parse_ttl,
|
|
ClockArg, CommonClientArgs, ReceivedStatsArg, TimestampArg,
|
|
};
|
|
pub use config::{expected_probe_count, DEFAULT_RECV_TIMEOUT};
|
|
pub use prepare::{prepare_managed_run, ManagedRunSetup, TargetSelection, MANAGED_EVENT_CAPACITY};
|
|
pub use session::is_shutdown_requested;
|
|
pub use targets::{
|
|
parse_labelled_target, prepare_managed_targets, target_specs, GroupPacingArg,
|
|
LabelledTargetArg, PreparedTarget, TargetSpec,
|
|
};
|