Class TpuConnection (2.12.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_v2_mocks::MockTpuConnection.

Functions

virtual options()

Returns
Type Description
Options

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

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

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

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

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

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

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

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

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

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

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

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

virtual UpdateNode(google::cloud::tpu::v2::UpdateNodeRequest const &)

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

virtual GenerateServiceIdentity(google::cloud::tpu::v2::GenerateServiceIdentityRequest const &)

Parameter
Name Description
request google::cloud::tpu::v2::GenerateServiceIdentityRequest const &
Returns
Type Description
StatusOr< google::cloud::tpu::v2::GenerateServiceIdentityResponse >

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

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

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

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

virtual ListRuntimeVersions(google::cloud::tpu::v2::ListRuntimeVersionsRequest)

Parameter
Name Description
request google::cloud::tpu::v2::ListRuntimeVersionsRequest
Returns
Type Description
StreamRange< google::cloud::tpu::v2::RuntimeVersion >

virtual GetRuntimeVersion(google::cloud::tpu::v2::GetRuntimeVersionRequest const &)

Parameter
Name Description
request google::cloud::tpu::v2::GetRuntimeVersionRequest const &
Returns
Type Description
StatusOr< google::cloud::tpu::v2::RuntimeVersion >

virtual GetGuestAttributes(google::cloud::tpu::v2::GetGuestAttributesRequest const &)

Parameter
Name Description
request google::cloud::tpu::v2::GetGuestAttributesRequest const &
Returns
Type Description
StatusOr< google::cloud::tpu::v2::GetGuestAttributesResponse >