Class TopicAdminConnection (2.23.0)

A connection to Cloud Pub/Sub for topic-related administrative operations.

This interface defines pure-virtual functions for each of the user-facing overload sets in TopicAdminClient. That is, all of TopicAdminClient's overloads will forward to the one pure-virtual function declared in this interface. This allows users to inject custom behavior (e.g., with a Google Mock object) in a TopicAdminClient object for use in their own tests.

To create a concrete instance that connects you to the real Cloud Pub/Sub service, see MakeTopicAdminConnection().

The *Params nested classes

Applications may define classes derived from TopicAdminConnection, for example, because they want to mock the class. To avoid breaking all such derived classes when we change the number or type of the arguments to the member functions we define lightweight structures to pass the arguments.

Functions

virtual CreateTopic(CreateTopicParams)

Defines the interface for TopicAdminClient::CreateTopic()

Parameter
Name Description
CreateTopicParams
Returns
Type Description
StatusOr< google::pubsub::v1::Topic >

virtual GetTopic(GetTopicParams)

Defines the interface for TopicAdminClient::GetTopic()

Parameter
Name Description
GetTopicParams
Returns
Type Description
StatusOr< google::pubsub::v1::Topic >

virtual UpdateTopic(UpdateTopicParams)

Defines the interface for TopicAdminClient::UpdateTopic()

Parameter
Name Description
UpdateTopicParams
Returns
Type Description
StatusOr< google::pubsub::v1::Topic >

virtual ListTopics(ListTopicsParams)

Defines the interface for TopicAdminClient::ListTopics()

Parameter
Name Description
ListTopicsParams
Returns
Type Description
ListTopicsRange

virtual DeleteTopic(DeleteTopicParams)

Defines the interface for TopicAdminClient::DeleteTopic()

Parameter
Name Description
DeleteTopicParams
Returns
Type Description
Status

virtual DetachSubscription(DetachSubscriptionParams)

Defines the interface for TopicAdminClient::DetachSubscriptions()

Parameter
Name Description
DetachSubscriptionParams
Returns
Type Description
StatusOr< google::pubsub::v1::DetachSubscriptionResponse >

virtual ListTopicSubscriptions(ListTopicSubscriptionsParams)

Parameter
Name Description
ListTopicSubscriptionsParams
Returns
Type Description
ListTopicSubscriptionsRange

virtual ListTopicSnapshots(ListTopicSnapshotsParams)

Defines the interface for TopicAdminClient::ListTopicSnapshots()

Parameter
Name Description
ListTopicSnapshotsParams
Returns
Type Description
ListTopicSnapshotsRange

virtual options() const

Returns the options used to create the connection.

Returns
Type Description
Options