pub struct CliClient {
pub(crate) grpc_client: ControllerClient<Channel>,
}Expand description
A CLI client that creates a connection with the ‘orchestrator’ and sends the desired commands based on the command-line input.
Fields§
§grpc_client: ControllerClient<Channel>Implementations§
Source§impl CliClient
impl CliClient
Sourcepub(crate) async fn do_measurement_to_server(
&mut self,
m_def: ScheduleMeasurement,
args: MeasurementExecutionArgs<'_>,
) -> Result<(), Box<dyn Error>>
pub(crate) async fn do_measurement_to_server( &mut self, m_def: ScheduleMeasurement, args: MeasurementExecutionArgs<'_>, ) -> Result<(), Box<dyn Error>>
Perform a measurement at the orchestrator, await measurement results, and write them to a file.
§Arguments
m_def- measurement definition for the orchestrator created from the command-line argumentsargs- contains additional arguments for the measurement execution
Sourcepub(crate) async fn do_live_measurement_to_server(
&mut self,
m_def: ScheduleMeasurement,
args: MeasurementExecutionArgs<'_>,
) -> Result<(), Box<dyn Error>>
pub(crate) async fn do_live_measurement_to_server( &mut self, m_def: ScheduleMeasurement, args: MeasurementExecutionArgs<'_>, ) -> Result<(), Box<dyn Error>>
Perform a live (feed-based) measurement at the orchestrator.
Opens a bidirectional stream: the measurement definition is sent first, then NDJSON targets read from stdin are forwarded as they arrive.
§Arguments
m_def- measurement definition for the orchestrator (empty hitlist)args- contains additional arguments for the measurement execution
Source§impl CliClient
impl CliClient
Sourcepub(crate) async fn connect(
address: &str,
tls: &TlsOptions<'_>,
) -> Result<ControllerClient<Channel>, Box<dyn Error>>
pub(crate) async fn connect( address: &str, tls: &TlsOptions<'_>, ) -> Result<ControllerClient<Channel>, Box<dyn Error>>
Connect to the orchestrator
§Arguments
address- the address of the orchestrator (e.g., 10.10.10.10:50051)tls- the TLS settings given on the command line
§Returns
A gRPC client that is connected to the orchestrator
§Remarks
When TLS is enabled, the connection is secured and the orchestrator authenticated.
Auto Trait Implementations§
impl !Freeze for CliClient
impl !RefUnwindSafe for CliClient
impl Send for CliClient
impl Sync for CliClient
impl Unpin for CliClient
impl UnsafeUnpin for CliClient
impl !UnwindSafe for CliClient
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].