pub struct CliClient {
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
Sourceasync fn do_measurement_to_server(
&mut self,
m_definition: ScheduleMeasurement,
args: MeasurementExecutionArgs<'_>,
) -> Result<(), Box<dyn Error>>
async fn do_measurement_to_server( &mut self, m_definition: ScheduleMeasurement, args: MeasurementExecutionArgs<'_>, ) -> Result<(), Box<dyn Error>>
Perform a measurement at the orchestrator, await measurement results, and write them to a file.
§Arguments
-
‘m_definition’ - measurement definition created from the command-line arguments
-
‘is_cli’ - boolean whether the results should be streamed to the CLI or not
-
‘is_shuffle’ - boolean whether the hitlist should be shuffled or not
-
‘hitlist’ - hitlist file path
-
‘hitlist_length’ - length of hitlist (i.e., number of target addresses)
-
‘path’ - optional path for output file (default is current directory)
-
‘is_config’ - boolean whether the measurement is configuration-based or not
-
‘worker_map’ - bidirectional map of worker IDs to hostnames
Sourceasync fn connect(
address: &str,
fqdn: Option<&String>,
) -> Result<ControllerClient<Channel>, Box<dyn Error>>
async fn connect( address: &str, fqdn: Option<&String>, ) -> Result<ControllerClient<Channel>, Box<dyn Error>>
Connect to the orchestrator
§Arguments
-
‘address’ - the address of the orchestrator (e.g., 10.10.10.10:50051)
-
‘fqdn’ - an optional string that contains the FQDN of the orchestrator certificate (if TLS is enabled)
§Returns
A gRPC client that is connected to the orchestrator
§Panics
If the connection to the orchestrator fails
§Remarks
TLS enabled requires a certificate at ./tls/orchestrator.crt
Auto Trait Implementations§
impl !Freeze for CliClient
impl !RefUnwindSafe for CliClient
impl Send for CliClient
impl Sync for CliClient
impl Unpin for CliClient
impl !UnwindSafe for CliClient
Blanket Implementations§
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
§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>
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>,
Layered
].