Struct CliClient

Source
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

Source

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

Source

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

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].
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more