MachineServiceClient

Struct MachineServiceClient 

Source
pub struct MachineServiceClient<T> { /* private fields */ }
Expand description

The machine service definition.

Implementations§

Source§

impl MachineServiceClient<Channel>

Source

pub async fn connect<D>(dst: D) -> Result<Self, Error>
where D: TryInto<Endpoint>, D::Error: Into<StdError>,

Attempt to create a new client by connecting to a given endpoint.

Source§

impl<T> MachineServiceClient<T>
where T: GrpcService<BoxBody>, T::Error: Into<StdError>, T::ResponseBody: Body<Data = Bytes> + Send + 'static, <T::ResponseBody as Body>::Error: Into<StdError> + Send,

Source

pub fn new(inner: T) -> Self

Source

pub fn with_origin(inner: T, origin: Uri) -> Self

Source

pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> MachineServiceClient<InterceptedService<T, F>>
where F: Interceptor, T::ResponseBody: Default, T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>, <T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,

Source

pub fn send_compressed(self, encoding: CompressionEncoding) -> Self

Compress requests with the given encoding.

This requires the server to support it otherwise it might respond with an error.

Source

pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self

Enable decompressing responses.

Source

pub fn max_decoding_message_size(self, limit: usize) -> Self

Limits the maximum size of a decoded message.

Default: 4MB

Source

pub fn max_encoding_message_size(self, limit: usize) -> Self

Limits the maximum size of an encoded message.

Default: usize::MAX

Source

pub async fn apply_configuration( &mut self, request: impl IntoRequest<ApplyConfigurationRequest>, ) -> Result<Response<ApplyConfigurationResponse>, Status>

Source

pub async fn bootstrap( &mut self, request: impl IntoRequest<BootstrapRequest>, ) -> Result<Response<BootstrapResponse>, Status>

Bootstrap method makes control plane node enter etcd bootstrap mode. Node aborts etcd join sequence and creates single-node etcd cluster. If recover_etcd argument is specified, etcd is recovered from a snapshot uploaded with EtcdRecover.

Source

pub async fn containers( &mut self, request: impl IntoRequest<ContainersRequest>, ) -> Result<Response<ContainersResponse>, Status>

Source

pub async fn copy( &mut self, request: impl IntoRequest<CopyRequest>, ) -> Result<Response<Streaming<Data>>, Status>

Source

pub async fn cpu_freq_stats( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<CpuFreqStatsResponse>, Status>

Source

pub async fn cpu_info( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<CpuInfoResponse>, Status>

Source

pub async fn disk_stats( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<DiskStatsResponse>, Status>

Source

pub async fn dmesg( &mut self, request: impl IntoRequest<DmesgRequest>, ) -> Result<Response<Streaming<Data>>, Status>

Source

pub async fn events( &mut self, request: impl IntoRequest<EventsRequest>, ) -> Result<Response<Streaming<Event>>, Status>

Source

pub async fn etcd_member_list( &mut self, request: impl IntoRequest<EtcdMemberListRequest>, ) -> Result<Response<EtcdMemberListResponse>, Status>

Source

pub async fn etcd_remove_member_by_id( &mut self, request: impl IntoRequest<EtcdRemoveMemberByIdRequest>, ) -> Result<Response<EtcdRemoveMemberByIdResponse>, Status>

EtcdRemoveMemberByID removes a member from the etcd cluster identified by member ID. This API should be used to remove members which don’t have an associated Talos node anymore. To remove a member with a running Talos node, use EtcdLeaveCluster API on the node to be removed.

Source

pub async fn etcd_leave_cluster( &mut self, request: impl IntoRequest<EtcdLeaveClusterRequest>, ) -> Result<Response<EtcdLeaveClusterResponse>, Status>

Source

pub async fn etcd_forfeit_leadership( &mut self, request: impl IntoRequest<EtcdForfeitLeadershipRequest>, ) -> Result<Response<EtcdForfeitLeadershipResponse>, Status>

Source

pub async fn etcd_recover( &mut self, request: impl IntoStreamingRequest<Message = Data>, ) -> Result<Response<EtcdRecoverResponse>, Status>

EtcdRecover method uploads etcd data snapshot created with EtcdSnapshot to the node. Snapshot can be later used to recover the cluster via Bootstrap method.

Source

pub async fn etcd_snapshot( &mut self, request: impl IntoRequest<EtcdSnapshotRequest>, ) -> Result<Response<Streaming<Data>>, Status>

EtcdSnapshot method creates etcd data snapshot (backup) from the local etcd instance and streams it back to the client. This method is available only on control plane nodes (which run etcd).

Source

pub async fn etcd_alarm_list( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<EtcdAlarmListResponse>, Status>

EtcdAlarmList lists etcd alarms for the current node. This method is available only on control plane nodes (which run etcd).

Source

pub async fn etcd_alarm_disarm( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<EtcdAlarmDisarmResponse>, Status>

EtcdAlarmDisarm disarms etcd alarms for the current node. This method is available only on control plane nodes (which run etcd).

Source

pub async fn etcd_defragment( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<EtcdDefragmentResponse>, Status>

EtcdDefragment defragments etcd data directory for the current node. Defragmentation is a resource-heavy operation, so it should only run on a specific node. This method is available only on control plane nodes (which run etcd).

Source

pub async fn etcd_status( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<EtcdStatusResponse>, Status>

EtcdStatus returns etcd status for the current member. This method is available only on control plane nodes (which run etcd).

Source

pub async fn generate_configuration( &mut self, request: impl IntoRequest<GenerateConfigurationRequest>, ) -> Result<Response<GenerateConfigurationResponse>, Status>

Source

pub async fn hostname( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<HostnameResponse>, Status>

Source

pub async fn kubeconfig( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<Streaming<Data>>, Status>

Source

pub async fn list( &mut self, request: impl IntoRequest<ListRequest>, ) -> Result<Response<Streaming<FileInfo>>, Status>

Source

pub async fn disk_usage( &mut self, request: impl IntoRequest<DiskUsageRequest>, ) -> Result<Response<Streaming<DiskUsageInfo>>, Status>

Source

pub async fn load_avg( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<LoadAvgResponse>, Status>

Source

pub async fn logs( &mut self, request: impl IntoRequest<LogsRequest>, ) -> Result<Response<Streaming<Data>>, Status>

Source

pub async fn logs_containers( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<LogsContainersResponse>, Status>

Source

pub async fn memory( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<MemoryResponse>, Status>

Source

pub async fn mounts( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<MountsResponse>, Status>

Source

pub async fn network_device_stats( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<NetworkDeviceStatsResponse>, Status>

Source

pub async fn processes( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<ProcessesResponse>, Status>

Source

pub async fn read( &mut self, request: impl IntoRequest<ReadRequest>, ) -> Result<Response<Streaming<Data>>, Status>

Source

pub async fn reboot( &mut self, request: impl IntoRequest<RebootRequest>, ) -> Result<Response<RebootResponse>, Status>

Source

pub async fn restart( &mut self, request: impl IntoRequest<RestartRequest>, ) -> Result<Response<RestartResponse>, Status>

Source

pub async fn rollback( &mut self, request: impl IntoRequest<RollbackRequest>, ) -> Result<Response<RollbackResponse>, Status>

Source

pub async fn reset( &mut self, request: impl IntoRequest<ResetRequest>, ) -> Result<Response<ResetResponse>, Status>

Source

pub async fn service_list( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<ServiceListResponse>, Status>

Source

pub async fn service_restart( &mut self, request: impl IntoRequest<ServiceRestartRequest>, ) -> Result<Response<ServiceRestartResponse>, Status>

Source

pub async fn service_start( &mut self, request: impl IntoRequest<ServiceStartRequest>, ) -> Result<Response<ServiceStartResponse>, Status>

Source

pub async fn service_stop( &mut self, request: impl IntoRequest<ServiceStopRequest>, ) -> Result<Response<ServiceStopResponse>, Status>

Source

pub async fn shutdown( &mut self, request: impl IntoRequest<ShutdownRequest>, ) -> Result<Response<ShutdownResponse>, Status>

Source

pub async fn stats( &mut self, request: impl IntoRequest<StatsRequest>, ) -> Result<Response<StatsResponse>, Status>

Source

pub async fn system_stat( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<SystemStatResponse>, Status>

Source

pub async fn upgrade( &mut self, request: impl IntoRequest<UpgradeRequest>, ) -> Result<Response<UpgradeResponse>, Status>

Source

pub async fn version( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<VersionResponse>, Status>

Source

pub async fn generate_client_configuration( &mut self, request: impl IntoRequest<GenerateClientConfigurationRequest>, ) -> Result<Response<GenerateClientConfigurationResponse>, Status>

GenerateClientConfiguration generates talosctl client configuration (talosconfig).

Source

pub async fn packet_capture( &mut self, request: impl IntoRequest<PacketCaptureRequest>, ) -> Result<Response<Streaming<Data>>, Status>

PacketCapture performs packet capture and streams back pcap file.

Source

pub async fn netstat( &mut self, request: impl IntoRequest<NetstatRequest>, ) -> Result<Response<NetstatResponse>, Status>

Netstat provides information about network connections.

Source

pub async fn meta_write( &mut self, request: impl IntoRequest<MetaWriteRequest>, ) -> Result<Response<MetaWriteResponse>, Status>

MetaWrite writes a META key-value pair.

Source

pub async fn meta_delete( &mut self, request: impl IntoRequest<MetaDeleteRequest>, ) -> Result<Response<MetaDeleteResponse>, Status>

MetaDelete deletes a META key.

Source

pub async fn image_list( &mut self, request: impl IntoRequest<ImageListRequest>, ) -> Result<Response<Streaming<ImageListResponse>>, Status>

ImageList lists images in the CRI.

Source

pub async fn image_pull( &mut self, request: impl IntoRequest<ImagePullRequest>, ) -> Result<Response<ImagePullResponse>, Status>

ImagePull pulls an image into the CRI.

Trait Implementations§

Source§

impl<T: Clone> Clone for MachineServiceClient<T>

Source§

fn clone(&self) -> MachineServiceClient<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for MachineServiceClient<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> !Freeze for MachineServiceClient<T>

§

impl<T> RefUnwindSafe for MachineServiceClient<T>
where T: RefUnwindSafe,

§

impl<T> Send for MachineServiceClient<T>
where T: Send,

§

impl<T> Sync for MachineServiceClient<T>
where T: Sync,

§

impl<T> Unpin for MachineServiceClient<T>
where T: Unpin,

§

impl<T> UnwindSafe for MachineServiceClient<T>
where T: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
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<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

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

Source§

fn vzip(self) -> V

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

impl<T> ErasedDestructor for T
where T: 'static,