Struct google_api_proto::google::cloud::tpu::v1::tpu_client::TpuClient
source · pub struct TpuClient<T> { /* private fields */ }
Expand description
Manages TPU nodes and other resources
TPU API v1
Implementations§
source§impl<T> TpuClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> TpuClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> TpuClient<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,
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
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.
sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
sourcepub async fn list_nodes(
&mut self,
request: impl IntoRequest<ListNodesRequest>,
) -> Result<Response<ListNodesResponse>, Status>
pub async fn list_nodes( &mut self, request: impl IntoRequest<ListNodesRequest>, ) -> Result<Response<ListNodesResponse>, Status>
Lists nodes.
sourcepub async fn get_node(
&mut self,
request: impl IntoRequest<GetNodeRequest>,
) -> Result<Response<Node>, Status>
pub async fn get_node( &mut self, request: impl IntoRequest<GetNodeRequest>, ) -> Result<Response<Node>, Status>
Gets the details of a node.
sourcepub async fn create_node(
&mut self,
request: impl IntoRequest<CreateNodeRequest>,
) -> Result<Response<Operation>, Status>
pub async fn create_node( &mut self, request: impl IntoRequest<CreateNodeRequest>, ) -> Result<Response<Operation>, Status>
Creates a node.
sourcepub async fn delete_node(
&mut self,
request: impl IntoRequest<DeleteNodeRequest>,
) -> Result<Response<Operation>, Status>
pub async fn delete_node( &mut self, request: impl IntoRequest<DeleteNodeRequest>, ) -> Result<Response<Operation>, Status>
Deletes a node.
sourcepub async fn reimage_node(
&mut self,
request: impl IntoRequest<ReimageNodeRequest>,
) -> Result<Response<Operation>, Status>
pub async fn reimage_node( &mut self, request: impl IntoRequest<ReimageNodeRequest>, ) -> Result<Response<Operation>, Status>
Reimages a node’s OS.
sourcepub async fn stop_node(
&mut self,
request: impl IntoRequest<StopNodeRequest>,
) -> Result<Response<Operation>, Status>
pub async fn stop_node( &mut self, request: impl IntoRequest<StopNodeRequest>, ) -> Result<Response<Operation>, Status>
Stops a node, this operation is only available with single TPU nodes.
sourcepub async fn start_node(
&mut self,
request: impl IntoRequest<StartNodeRequest>,
) -> Result<Response<Operation>, Status>
pub async fn start_node( &mut self, request: impl IntoRequest<StartNodeRequest>, ) -> Result<Response<Operation>, Status>
Starts a node.
sourcepub async fn list_tensor_flow_versions(
&mut self,
request: impl IntoRequest<ListTensorFlowVersionsRequest>,
) -> Result<Response<ListTensorFlowVersionsResponse>, Status>
pub async fn list_tensor_flow_versions( &mut self, request: impl IntoRequest<ListTensorFlowVersionsRequest>, ) -> Result<Response<ListTensorFlowVersionsResponse>, Status>
List TensorFlow versions supported by this API.
sourcepub async fn get_tensor_flow_version(
&mut self,
request: impl IntoRequest<GetTensorFlowVersionRequest>,
) -> Result<Response<TensorFlowVersion>, Status>
pub async fn get_tensor_flow_version( &mut self, request: impl IntoRequest<GetTensorFlowVersionRequest>, ) -> Result<Response<TensorFlowVersion>, Status>
Gets TensorFlow Version.
sourcepub async fn list_accelerator_types(
&mut self,
request: impl IntoRequest<ListAcceleratorTypesRequest>,
) -> Result<Response<ListAcceleratorTypesResponse>, Status>
pub async fn list_accelerator_types( &mut self, request: impl IntoRequest<ListAcceleratorTypesRequest>, ) -> Result<Response<ListAcceleratorTypesResponse>, Status>
Lists accelerator types supported by this API.
sourcepub async fn get_accelerator_type(
&mut self,
request: impl IntoRequest<GetAcceleratorTypeRequest>,
) -> Result<Response<AcceleratorType>, Status>
pub async fn get_accelerator_type( &mut self, request: impl IntoRequest<GetAcceleratorTypeRequest>, ) -> Result<Response<AcceleratorType>, Status>
Gets AcceleratorType.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for TpuClient<T>
impl<T> RefUnwindSafe for TpuClient<T>where
T: RefUnwindSafe,
impl<T> Send for TpuClient<T>where
T: Send,
impl<T> Sync for TpuClient<T>where
T: Sync,
impl<T> Unpin for TpuClient<T>where
T: Unpin,
impl<T> UnwindSafe for TpuClient<T>where
T: UnwindSafe,
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
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>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request