Class TpuConnection (2.34.0-rc)

The TpuConnection object for TpuClient.

This interface defines virtual methods for each of the user-facing overload sets in TpuClient. This allows users to inject custom behavior (e.g., with a Google Mock object) when writing tests that use objects of type TpuClient.

To create a concrete instance, see MakeTpuConnection().

For mocking, see tpu_v1_mocks::MockTpuConnection.

Functions

virtual options()

Returns
Type Description
Options

virtual ListNodes(google::cloud::tpu::v1::ListNodesRequest)

Parameter
Name Description
request google::cloud::tpu::v1::ListNodesRequest
Returns
Type Description
StreamRange< google::cloud::tpu::v1::Node >

virtual GetNode(google::cloud::tpu::v1::GetNodeRequest const &)

Parameter
Name Description
request google::cloud::tpu::v1::GetNodeRequest const &
Returns
Type Description
StatusOr< google::cloud::tpu::v1::Node >

virtual CreateNode(google::cloud::tpu::v1::CreateNodeRequest const &)

Parameter
Name Description
request google::cloud::tpu::v1::CreateNodeRequest const &
Returns
Type Description
future< StatusOr< google::cloud::tpu::v1::Node > >

virtual CreateNode(NoAwaitTag, google::cloud::tpu::v1::CreateNodeRequest const &)

Parameters
Name Description
NoAwaitTag
request google::cloud::tpu::v1::CreateNodeRequest const &
Returns
Type Description
StatusOr< google::longrunning::Operation >

virtual CreateNode(google::longrunning::Operation const &)

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::tpu::v1::Node > >

virtual DeleteNode(google::cloud::tpu::v1::DeleteNodeRequest const &)

Parameter
Name Description
request google::cloud::tpu::v1::DeleteNodeRequest const &
Returns
Type Description
future< StatusOr< google::cloud::tpu::v1::Node > >

virtual DeleteNode(NoAwaitTag, google::cloud::tpu::v1::DeleteNodeRequest const &)

Parameters
Name Description
NoAwaitTag
request google::cloud::tpu::v1::DeleteNodeRequest const &
Returns
Type Description
StatusOr< google::longrunning::Operation >

virtual DeleteNode(google::longrunning::Operation const &)

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::tpu::v1::Node > >

virtual ReimageNode(google::cloud::tpu::v1::ReimageNodeRequest const &)

Parameter
Name Description
request google::cloud::tpu::v1::ReimageNodeRequest const &
Returns
Type Description
future< StatusOr< google::cloud::tpu::v1::Node > >

virtual ReimageNode(NoAwaitTag, google::cloud::tpu::v1::ReimageNodeRequest const &)

Parameters
Name Description
NoAwaitTag
request google::cloud::tpu::v1::ReimageNodeRequest const &
Returns
Type Description
StatusOr< google::longrunning::Operation >

virtual ReimageNode(google::longrunning::Operation const &)

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::tpu::v1::Node > >

virtual StopNode(google::cloud::tpu::v1::StopNodeRequest const &)

Parameter
Name Description
request google::cloud::tpu::v1::StopNodeRequest const &
Returns
Type Description
future< StatusOr< google::cloud::tpu::v1::Node > >

virtual StopNode(NoAwaitTag, google::cloud::tpu::v1::StopNodeRequest const &)

Parameters
Name Description
NoAwaitTag
request google::cloud::tpu::v1::StopNodeRequest const &
Returns
Type Description
StatusOr< google::longrunning::Operation >

virtual StopNode(google::longrunning::Operation const &)

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::tpu::v1::Node > >

virtual StartNode(google::cloud::tpu::v1::StartNodeRequest const &)

Parameter
Name Description
request google::cloud::tpu::v1::StartNodeRequest const &
Returns
Type Description
future< StatusOr< google::cloud::tpu::v1::Node > >

virtual StartNode(NoAwaitTag, google::cloud::tpu::v1::StartNodeRequest const &)

Parameters
Name Description
NoAwaitTag
request google::cloud::tpu::v1::StartNodeRequest const &
Returns
Type Description
StatusOr< google::longrunning::Operation >

virtual StartNode(google::longrunning::Operation const &)

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::tpu::v1::Node > >

virtual ListTensorFlowVersions(google::cloud::tpu::v1::ListTensorFlowVersionsRequest)

Parameter
Name Description
request google::cloud::tpu::v1::ListTensorFlowVersionsRequest
Returns
Type Description
StreamRange< google::cloud::tpu::v1::TensorFlowVersion >

virtual GetTensorFlowVersion(google::cloud::tpu::v1::GetTensorFlowVersionRequest const &)

Parameter
Name Description
request google::cloud::tpu::v1::GetTensorFlowVersionRequest const &
Returns
Type Description
StatusOr< google::cloud::tpu::v1::TensorFlowVersion >

virtual ListAcceleratorTypes(google::cloud::tpu::v1::ListAcceleratorTypesRequest)

Parameter
Name Description
request google::cloud::tpu::v1::ListAcceleratorTypesRequest
Returns
Type Description
StreamRange< google::cloud::tpu::v1::AcceleratorType >

virtual GetAcceleratorType(google::cloud::tpu::v1::GetAcceleratorTypeRequest const &)

Parameter
Name Description
request google::cloud::tpu::v1::GetAcceleratorTypeRequest const &
Returns
Type Description
StatusOr< google::cloud::tpu::v1::AcceleratorType >

virtual ListLocations(google::cloud::location::ListLocationsRequest)

Parameter
Name Description
request google::cloud::location::ListLocationsRequest
Returns
Type Description
StreamRange< google::cloud::location::Location >

virtual GetLocation(google::cloud::location::GetLocationRequest const &)

Parameter
Name Description
request google::cloud::location::GetLocationRequest const &
Returns
Type Description
StatusOr< google::cloud::location::Location >

virtual ListOperations(google::longrunning::ListOperationsRequest)

Parameter
Name Description
request google::longrunning::ListOperationsRequest
Returns
Type Description
StreamRange< google::longrunning::Operation >

virtual GetOperation(google::longrunning::GetOperationRequest const &)

Parameter
Name Description
request google::longrunning::GetOperationRequest const &
Returns
Type Description
StatusOr< google::longrunning::Operation >

virtual DeleteOperation(google::longrunning::DeleteOperationRequest const &)

Parameter
Name Description
request google::longrunning::DeleteOperationRequest const &
Returns
Type Description
Status

virtual CancelOperation(google::longrunning::CancelOperationRequest const &)

Parameter
Name Description
request google::longrunning::CancelOperationRequest const &
Returns
Type Description
Status