Class TpuConnection (2.26.0)

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(ExperimentalTag, NoAwaitTag, google::cloud::tpu::v1::CreateNodeRequest const &)

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

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

Parameters
Name Description
ExperimentalTag
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(ExperimentalTag, NoAwaitTag, google::cloud::tpu::v1::DeleteNodeRequest const &)

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

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

Parameters
Name Description
ExperimentalTag
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(ExperimentalTag, NoAwaitTag, google::cloud::tpu::v1::ReimageNodeRequest const &)

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

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

Parameters
Name Description
ExperimentalTag
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(ExperimentalTag, NoAwaitTag, google::cloud::tpu::v1::StopNodeRequest const &)

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

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

Parameters
Name Description
ExperimentalTag
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(ExperimentalTag, NoAwaitTag, google::cloud::tpu::v1::StartNodeRequest const &)

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

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

Parameters
Name Description
ExperimentalTag
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 >