Struct googapis::google::pubsub::v1::publisher_client::PublisherClient [−][src]
pub struct PublisherClient<T> { /* fields omitted */ }
Expand description
The service that an application uses to manipulate topics, and to send messages to a topic.
Implementations
impl<T> PublisherClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> PublisherClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn with_interceptor<F>(
inner: T,
interceptor: F
) -> PublisherClient<InterceptedService<T, F>> where
F: Interceptor,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Compress requests with gzip
.
This requires the server to support it otherwise it might respond with an error.
Enable decompressing responses with gzip
.
pub async fn create_topic(
&mut self,
request: impl IntoRequest<Topic>
) -> Result<Response<Topic>, Status>
pub async fn create_topic(
&mut self,
request: impl IntoRequest<Topic>
) -> Result<Response<Topic>, Status>
Creates the given topic with the given name. See the [resource name rules] (https://cloud.google.com/pubsub/docs/admin#resource_names).
pub async fn update_topic(
&mut self,
request: impl IntoRequest<UpdateTopicRequest>
) -> Result<Response<Topic>, Status>
pub async fn update_topic(
&mut self,
request: impl IntoRequest<UpdateTopicRequest>
) -> Result<Response<Topic>, Status>
Updates an existing topic. Note that certain properties of a topic are not modifiable.
pub async fn publish(
&mut self,
request: impl IntoRequest<PublishRequest>
) -> Result<Response<PublishResponse>, Status>
pub async fn publish(
&mut self,
request: impl IntoRequest<PublishRequest>
) -> Result<Response<PublishResponse>, Status>
Adds one or more messages to the topic. Returns NOT_FOUND
if the topic
does not exist.
pub async fn get_topic(
&mut self,
request: impl IntoRequest<GetTopicRequest>
) -> Result<Response<Topic>, Status>
pub async fn get_topic(
&mut self,
request: impl IntoRequest<GetTopicRequest>
) -> Result<Response<Topic>, Status>
Gets the configuration of a topic.
pub async fn list_topics(
&mut self,
request: impl IntoRequest<ListTopicsRequest>
) -> Result<Response<ListTopicsResponse>, Status>
pub async fn list_topics(
&mut self,
request: impl IntoRequest<ListTopicsRequest>
) -> Result<Response<ListTopicsResponse>, Status>
Lists matching topics.
pub async fn list_topic_subscriptions(
&mut self,
request: impl IntoRequest<ListTopicSubscriptionsRequest>
) -> Result<Response<ListTopicSubscriptionsResponse>, Status>
pub async fn list_topic_subscriptions(
&mut self,
request: impl IntoRequest<ListTopicSubscriptionsRequest>
) -> Result<Response<ListTopicSubscriptionsResponse>, Status>
Lists the names of the attached subscriptions on this topic.
pub async fn list_topic_snapshots(
&mut self,
request: impl IntoRequest<ListTopicSnapshotsRequest>
) -> Result<Response<ListTopicSnapshotsResponse>, Status>
pub async fn list_topic_snapshots(
&mut self,
request: impl IntoRequest<ListTopicSnapshotsRequest>
) -> Result<Response<ListTopicSnapshotsResponse>, Status>
Lists the names of the snapshots on this topic. Snapshots are used in Seek operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.
pub async fn delete_topic(
&mut self,
request: impl IntoRequest<DeleteTopicRequest>
) -> Result<Response<()>, Status>
pub async fn delete_topic(
&mut self,
request: impl IntoRequest<DeleteTopicRequest>
) -> Result<Response<()>, Status>
Deletes the topic with the given name. Returns NOT_FOUND
if the topic
does not exist. After a topic is deleted, a new topic may be created with
the same name; this is an entirely new topic with none of the old
configuration or subscriptions. Existing subscriptions to this topic are
not deleted, but their topic
field is set to _deleted-topic_
.
pub async fn detach_subscription(
&mut self,
request: impl IntoRequest<DetachSubscriptionRequest>
) -> Result<Response<DetachSubscriptionResponse>, Status>
pub async fn detach_subscription(
&mut self,
request: impl IntoRequest<DetachSubscriptionRequest>
) -> Result<Response<DetachSubscriptionResponse>, Status>
Detaches a subscription from this topic. All messages retained in the
subscription are dropped. Subsequent Pull
and StreamingPull
requests
will return FAILED_PRECONDITION. If the subscription is a push
subscription, pushes to the endpoint will stop.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for PublisherClient<T> where
T: RefUnwindSafe,
impl<T> Send for PublisherClient<T> where
T: Send,
impl<T> Sync for PublisherClient<T> where
T: Sync,
impl<T> Unpin for PublisherClient<T> where
T: Unpin,
impl<T> UnwindSafe for PublisherClient<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more