Skip to main content

ControlClient

Struct ControlClient 

Source
pub struct ControlClient { /* private fields */ }
Expand description

Клиент управления инстансом.

Implementations§

Source§

impl ControlClient

Source

pub async fn halt( &mut self, context: &CallContext, command: HaltCommand, ) -> Result<(), ClientError>

Остановить инстанс.

§Ошибки

Несовместимые параметры команды — INVALID_ARGUMENT; защита памяти не взведена — FAILED_PRECONDITION.

Source

pub async fn change_global_logging( &mut self, context: &CallContext, command: ChangeGlobalLoggingCommand, ) -> Result<(), ClientError>

Сменить уровень и формат журнала на ходу.

Source

pub async fn memory_diagnostics( &mut self, context: &CallContext, request_message: MemoryDiagnosticsRequest, ) -> Result<MemoryInfo, ClientError>

Состояние памяти процесса.

Source

pub async fn consume_logs( &mut self, context: &CallContext, min_level: LogLevel, ) -> Result<GuardedStream<Streaming<LogMessage>>, ClientError>

Поток сообщений журнала уровня не ниже min_level.

Source

pub async fn dump_requests( &mut self, context: &CallContext, filter: DumpFilter, ) -> Result<GuardedStream<Streaming<DumpedRequest>>, ClientError>

Поток записей о запросах, отобранных фильтром.

Source

pub async fn network_traffic_diagnostics( &mut self, context: &CallContext, request_message: NetworkTrafficRequest, ) -> Result<NetworkTrafficResponse, ClientError>

Проверить прохождение нагрузки: вернуть ответ с заданными свойствами.

Source

pub async fn network_request_diagnostics( &mut self, context: &CallContext, request_message: NetworkRequestRequest, ) -> Result<NetworkRequestResponse, ClientError>

Проверить прохождение запроса по цепочке адресов.

Source

pub async fn network_request_diagnostics_response( &mut self, context: &CallContext, request_message: NetworkRequestRequest, ) -> Result<Response<NetworkRequestResponse>, ClientError>

Проверить прохождение запроса и вернуть метаданные ответа.

Метаданные включают заголовки и трейлеры: транспорт склеивает их в один набор.

Source

pub async fn network_request_diagnostics_parts( &mut self, context: &CallContext, request_message: NetworkRequestRequest, ) -> Result<NetworkDiagnostics, ClientError>

Проверить прохождение запроса, разделив заголовки и трейлеры ответа.

Обычный вызов склеивает их в метаданные ответа. Здесь нужен низкоуровневый вызов: только он отдаёт трейлеры отдельно.

Auto Trait Implementations§

§

impl !Freeze for ControlClient

§

impl !RefUnwindSafe for ControlClient

§

impl !UnwindSafe for ControlClient

§

impl Forget for ControlClient

§

impl Move for ControlClient

§

impl Send for ControlClient
where Arc<Settings>: Send, Arc<dyn CallLoad>: Send, Arc<ClientLog>: Send, Arc<Chan<Message<Request<Body>, Pin<Box<dyn Future<Output = Result<Response<Body>, Box<dyn Error + Sync + Send>>> + Send>>>, Semaphore>>: Send, BoxRaw<dyn Future<Output = Result<OwnedPermit<Message<Request<Body>, Pin<Box<dyn Future<Output = Result<Response<Body>, Box<dyn Error + Sync + Send>>> + Send>>>>, PollSendError<Message<Request<Body>, Pin<Box<dyn Future<Output = Result<Response<Body>, Box<dyn Error + Sync + Send>>> + Send>>>>>> + Send>: Send, Arc<Mutex<Option<ServiceError>>>: Send, BoxRaw<ByteStr>: Send, Bytes: Send,

§

impl Sync for ControlClient
where Arc<Settings>: Sync, Arc<dyn CallLoad>: Sync, Arc<ClientLog>: Sync, Arc<Chan<Message<Request<Body>, Pin<Box<dyn Future<Output = Result<Response<Body>, Box<dyn Error + Sync + Send>>> + Send>>>, Semaphore>>: Sync, ReusableBoxFuture<'static, Result<OwnedPermit<Message<Request<Body>, Pin<Box<dyn Future<Output = Result<Response<Body>, Box<dyn Error + Sync + Send>>> + Send>>>>, PollSendError<Message<Request<Body>, Pin<Box<dyn Future<Output = Result<Response<Body>, Box<dyn Error + Sync + Send>>> + Send>>>>>>: Sync, Arc<Mutex<Option<ServiceError>>>: Sync, BoxRaw<ByteStr>: Sync, Bytes: Sync,

§

impl Unpin for ControlClient
where Arc<Settings>: Unpin, Arc<dyn CallLoad>: Unpin, Arc<ClientLog>: Unpin, Arc<Chan<Message<Request<Body>, Pin<Box<dyn Future<Output = Result<Response<Body>, Box<dyn Error + Sync + Send>>> + Send>>>, Semaphore>>: Unpin, Box<dyn Future<Output = Result<OwnedPermit<Message<Request<Body>, Pin<Box<dyn Future<Output = Result<Response<Body>, Box<dyn Error + Sync + Send>>> + Send>>>>, PollSendError<Message<Request<Body>, Pin<Box<dyn Future<Output = Result<Response<Body>, Box<dyn Error + Sync + Send>>> + Send>>>>>> + Send>: Unpin, Arc<Mutex<Option<ServiceError>>>: Unpin, Box<ByteStr>: Unpin, *const u8: Unpin, Align8<*mut ()>: Unpin, &'static Vtable: Unpin,

§

impl UnsafeUnpin for ControlClient
where *const ArcInner<Settings> is !null: UnsafeUnpin, PhantomData<ArcInner<Settings>>: UnsafeUnpin, *const ArcInner<dyn CallLoad> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn CallLoad>>: UnsafeUnpin, *const ArcInner<ClientLog> is !null: UnsafeUnpin, PhantomData<ArcInner<ClientLog>>: UnsafeUnpin, *const ArcInner<Chan<Message<Request<Body>, Pin<Box<dyn Future<Output = Result<Response<Body>, Box<dyn Error + Sync + Send>>> + Send>>>, Semaphore>> is !null: UnsafeUnpin, PhantomData<ArcInner<Chan<Message<Request<Body>, Pin<Box<dyn Future<Output = Result<Response<Body>, Box<dyn Error + Sync + Send>>> + Send>>>, Semaphore>>>: UnsafeUnpin, *const dyn Future<Output = Result<OwnedPermit<Message<Request<Body>, Pin<Box<dyn Future<Output = Result<Response<Body>, Box<dyn Error + Sync + Send>>> + Send>>>>, PollSendError<Message<Request<Body>, Pin<Box<dyn Future<Output = Result<Response<Body>, Box<dyn Error + Sync + Send>>> + Send>>>>>> + Send is !null: UnsafeUnpin, PhantomData<dyn Future<Output = Result<OwnedPermit<Message<Request<Body>, Pin<Box<dyn Future<Output = Result<Response<Body>, Box<dyn Error + Sync + Send>>> + Send>>>>, PollSendError<Message<Request<Body>, Pin<Box<dyn Future<Output = Result<Response<Body>, Box<dyn Error + Sync + Send>>> + Send>>>>>> + Send>: UnsafeUnpin, *const ArcInner<Mutex<Option<ServiceError>>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<Option<ServiceError>>>>: UnsafeUnpin, *const ByteStr is !null: UnsafeUnpin, PhantomData<ByteStr>: UnsafeUnpin, *const u8: UnsafeUnpin, Align8<*mut ()>: UnsafeUnpin, &'static Vtable: UnsafeUnpin,

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.

Source§

impl<T> Instrument for T

Source§

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

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

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.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

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

impl<L> LayerExt<L> for L

Source§

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 = !

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

fn try_from(value: U) -> Result<T, !>

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

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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