Class TopicAdminConnection (2.21.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
NameDescription
CreateTopicParams
Returns
TypeDescription
StatusOr< google::pubsub::v1::Topic >

virtual GetTopic(GetTopicParams)

Defines the interface for TopicAdminClient::GetTopic()

Parameter
NameDescription
GetTopicParams
Returns
TypeDescription
StatusOr< google::pubsub::v1::Topic >

virtual UpdateTopic(UpdateTopicParams)

Defines the interface for TopicAdminClient::UpdateTopic()

Parameter
NameDescription
UpdateTopicParams
Returns
TypeDescription
StatusOr< google::pubsub::v1::Topic >

virtual ListTopics(ListTopicsParams)

Defines the interface for TopicAdminClient::ListTopics()

Parameter
NameDescription
ListTopicsParams
Returns
TypeDescription
ListTopicsRange

virtual DeleteTopic(DeleteTopicParams)

Defines the interface for TopicAdminClient::DeleteTopic()

Parameter
NameDescription
DeleteTopicParams
Returns
TypeDescription
Status

virtual DetachSubscription(DetachSubscriptionParams)

Defines the interface for TopicAdminClient::DetachSubscriptions()

Parameter
NameDescription
DetachSubscriptionParams
Returns
TypeDescription
StatusOr< google::pubsub::v1::DetachSubscriptionResponse >

virtual ListTopicSubscriptions(ListTopicSubscriptionsParams)

Parameter
NameDescription
ListTopicSubscriptionsParams
Returns
TypeDescription
ListTopicSubscriptionsRange

virtual ListTopicSnapshots(ListTopicSnapshotsParams)

Defines the interface for TopicAdminClient::ListTopicSnapshots()

Parameter
NameDescription
ListTopicSnapshotsParams
Returns
TypeDescription
ListTopicSnapshotsRange

virtual options() const

Returns the options used to create the connection.

Returns
TypeDescription
Options