Class TpuConnection (2.19.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
TypeDescription
Options

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

Parameter
NameDescription
request google::cloud::tpu::v2::ListNodesRequest
Returns
TypeDescription
StreamRange< google::cloud::tpu::v2::Node >

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

Parameter
NameDescription
request google::cloud::tpu::v2::GetNodeRequest const &
Returns
TypeDescription
StatusOr< google::cloud::tpu::v2::Node >

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

Parameter
NameDescription
request google::cloud::tpu::v2::CreateNodeRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::tpu::v2::Node > >

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

Parameter
NameDescription
request google::cloud::tpu::v2::DeleteNodeRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::tpu::v2::OperationMetadata > >

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

Parameter
NameDescription
request google::cloud::tpu::v2::StopNodeRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::tpu::v2::Node > >

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

Parameter
NameDescription
request google::cloud::tpu::v2::StartNodeRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::tpu::v2::Node > >

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

Parameter
NameDescription
request google::cloud::tpu::v2::UpdateNodeRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::tpu::v2::Node > >

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

Parameter
NameDescription
request google::cloud::tpu::v2::GenerateServiceIdentityRequest const &
Returns
TypeDescription
StatusOr< google::cloud::tpu::v2::GenerateServiceIdentityResponse >

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

Parameter
NameDescription
request google::cloud::tpu::v2::ListAcceleratorTypesRequest
Returns
TypeDescription
StreamRange< google::cloud::tpu::v2::AcceleratorType >

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

Parameter
NameDescription
request google::cloud::tpu::v2::GetAcceleratorTypeRequest const &
Returns
TypeDescription
StatusOr< google::cloud::tpu::v2::AcceleratorType >

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

Parameter
NameDescription
request google::cloud::tpu::v2::ListRuntimeVersionsRequest
Returns
TypeDescription
StreamRange< google::cloud::tpu::v2::RuntimeVersion >

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

Parameter
NameDescription
request google::cloud::tpu::v2::GetRuntimeVersionRequest const &
Returns
TypeDescription
StatusOr< google::cloud::tpu::v2::RuntimeVersion >

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

Parameter
NameDescription
request google::cloud::tpu::v2::GetGuestAttributesRequest const &
Returns
TypeDescription
StatusOr< google::cloud::tpu::v2::GetGuestAttributesResponse >