Skip to content

Commit 21f6ab9

Browse files
committed
Add missing docs, improve CLI help
1 parent 31c59ab commit 21f6ab9

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

mirrord/cli/src/config.rs

+1
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,7 @@ pub(super) struct ListTargetArgs {
801801
pub config_file: Option<PathBuf>,
802802

803803
/// Specify the type of target to be retrieved. If `None`, all types are retrieved.
804+
/// Can be used multiple times to specify multiple target types.
804805
#[arg(short = 't', long)]
805806
pub target_type: Option<Vec<TargetType>>,
806807
}

mirrord/cli/src/list.rs

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ use tracing::Level;
1616

1717
use crate::{util, CliError, CliResult, Format, ListTargetArgs};
1818

19+
/// Name of the environment variable used to specify which resource types to list with `mirrord ls`.
20+
/// Primarily used by the plugins when the user picks a target to fetch fewer targets at once.
1921
const LS_TARGET_TYPES_ENV: &str = "MIRRORD_LS_TARGET_TYPES";
2022

2123
/// A mirrord target found in the cluster.

mirrord/kube/src/api/kubernetes/seeker.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,8 @@ impl KubeResourceSeeker<'_> {
7373
.collect())
7474
}
7575

76-
/// Returns a specified resource type, as long as either:
77-
/// 1. The resource type doesn't require the operator
78-
/// 2. The operator is being used
76+
/// Returns the targets of the specified resource type(s), as long as the operator is active or
77+
/// no given types require the operator.
7978
pub async fn filtered(
8079
&self,
8180
resource_types: Vec<TargetType>,
@@ -90,6 +89,9 @@ impl KubeResourceSeeker<'_> {
9089
.concat())
9190
}
9291

92+
/// Returns the targets of a single specified resource type, as long as either:
93+
/// 1. The resource type doesn't require the operator
94+
/// 2. The operator is being used
9395
async fn filtered_single(
9496
&self,
9597
resource_type: TargetType,

0 commit comments

Comments
 (0)