Namespace google::cloud::pubsublite (2.22.0)

Classes

AdminServiceClient

The service that a client application uses to manage topics and subscriptions, such creating, listing, and deleting topics and subscriptions.

AdminServiceConnection

The AdminServiceConnection object for AdminServiceClient.

AdminServiceConnectionIdempotencyPolicy

AdminServiceLimitedErrorCountRetryPolicy

A retry policy for AdminServiceConnection based on counting errors.

AdminServiceLimitedTimeRetryPolicy

A retry policy for AdminServiceConnection based on elapsed time.

AdminServiceRetryPolicy

The retry policy for AdminServiceConnection.

Topic

Objects of this class identify a Cloud Pub/Sub Lite topic.

TopicStatsServiceClient

This service allows users to get stats about messages in their topic.

TopicStatsServiceConnection

The TopicStatsServiceConnection object for TopicStatsServiceClient.

TopicStatsServiceConnectionIdempotencyPolicy

TopicStatsServiceLimitedErrorCountRetryPolicy

A retry policy for TopicStatsServiceConnection based on counting errors.

TopicStatsServiceLimitedTimeRetryPolicy

A retry policy for TopicStatsServiceConnection based on elapsed time.

TopicStatsServiceRetryPolicy

The retry policy for TopicStatsServiceConnection.

Structs

AdminServiceBackoffPolicyOption

Use with google::cloud::Options to configure the backoff policy.

AdminServiceConnectionIdempotencyPolicyOption

Use with google::cloud::Options to configure which operations are retried.

AdminServicePollingPolicyOption

Use with google::cloud::Options to configure the long-running operations polling policy.

AdminServiceRetryPolicyOption

Use with google::cloud::Options to configure the retry policy.

MaxBatchBytesOption

Publish a batch when its size in bytes reaches this value.

MaxBatchMessagesOption

Publish a batch when it has this many messages.

MessageMetadata

This struct stores the partition and Cursor of a published Pub/Sub Lite message.

PublishFlushAlarmPeriodOption

The interval at which Flush will be called on single-partition Publishers to publish all remaining messages.

PublishMessageTransformerOption

TopicStatsServiceBackoffPolicyOption

Use with google::cloud::Options to configure the backoff policy.

TopicStatsServiceConnectionIdempotencyPolicyOption

Use with google::cloud::Options to configure which operations are retried.

TopicStatsServiceRetryPolicyOption

Use with google::cloud::Options to configure the retry policy.

Functions

MakeAdminServiceConnection(Options)

A factory function to construct an object of type AdminServiceConnection.

The returned connection object should not be used directly; instead it should be passed as an argument to the constructor of AdminServiceClient.

The optional options argument may be used to configure aspects of the returned AdminServiceConnection. Expected options are any of the types in the following option lists:

Parameter
NameDescription
options

(optional) Configure the AdminServiceConnection created by this function.

Returns
TypeDescription
std::shared_ptr< AdminServiceConnection >

MakeDefaultAdminServiceConnectionIdempotencyPolicy()

Returns
TypeDescription
std::unique_ptr< AdminServiceConnectionIdempotencyPolicy >

EndpointFromZone(std::string const &)

Returns the appropriate endpoint given a zone name.

Given a zone name in ${region}-[a-z] form it returns the appropriate regional endpoint to contact the Pub/Sub Lite service. Use the value returned to initialize the library via google::cloud::EndpointOption.

Parameter
NameDescription
zone_id
Returns
TypeDescription
StatusOr< std::string >

EndpointFromRegion(std::string const &)

Returns the appropriate endpoint given a region name.

Given a region name it returns the appropriate regional endpoint to contact the Pub/Sub Lite service. Use the value returned to initialize the library via google::cloud::EndpointOption.

Parameter
NameDescription
region_id
Returns
TypeDescription
StatusOr< std::string >

MakeMessageMetadata(std::string const &)

Parses a string into a MessageMetadata object.

The formatting of this string is not stable cross-binary.

Parameter
NameDescription
input
Returns
TypeDescription
StatusOr< MessageMetadata >

MakePublisherConnection(std::shared_ptr< AdminServiceConnection >, Topic, Options)

Creates a new PublisherConnection object to work with Publisher.

Parameters
NameDescription
admin_connection

a connection to the Pub/Sub Lite Admin API. This is needed to query the number of partitions in the topic.

topic

the Cloud Pub/Sub Lite topic used by the returned PublisherConnection.

opts

The options to use for this call. Expected options are any of the types in the following option lists and in google/cloud/pubsublite/options.h.

Returns
TypeDescription
StatusOr< std::unique_ptr< google::cloud::pubsub::PublisherConnection > >

MakePublisherConnection(Topic, Options)

Creates a new PublisherConnection object to work with Publisher.

Parameters
NameDescription
topic

the Cloud Pub/Sub Lite topic used by the returned PublisherConnection.

opts

The options to use for this call. Expected options are any of the types in the following option lists and in google/cloud/pubsublite/options.h.

Returns
TypeDescription
StatusOr< std::unique_ptr< google::cloud::pubsub::PublisherConnection > >

MakeTopicStatsServiceConnection(Options)

A factory function to construct an object of type TopicStatsServiceConnection.

The returned connection object should not be used directly; instead it should be passed as an argument to the constructor of TopicStatsServiceClient.

The optional options argument may be used to configure aspects of the returned TopicStatsServiceConnection. Expected options are any of the types in the following option lists:

Parameter
NameDescription
options

(optional) Configure the TopicStatsServiceConnection created by this function.

Returns
TypeDescription
std::shared_ptr< TopicStatsServiceConnection >

MakeDefaultTopicStatsServiceConnectionIdempotencyPolicy()

Returns
TypeDescription
std::unique_ptr< TopicStatsServiceConnectionIdempotencyPolicy >

Type Aliases

AdminServicePolicyOptionList

Alias Of: OptionList< AdminServiceRetryPolicyOption, AdminServiceBackoffPolicyOption, AdminServicePollingPolicyOption, AdminServiceConnectionIdempotencyPolicyOption >

The options applicable to AdminService.

PublishMessageTransformer

Alias Of: std::function< StatusOr< google::cloud::pubsublite::v1::PubSubMessage >(google::cloud::pubsub::Message)>

Converts a Google Cloud Pub/Sub Message into a Google Cloud Pub/Sub Lite protobuf PubSubMessage.

TopicStatsServicePolicyOptionList

Alias Of: OptionList< TopicStatsServiceRetryPolicyOption, TopicStatsServiceBackoffPolicyOption, TopicStatsServiceConnectionIdempotencyPolicyOption >

The options applicable to TopicStatsService.