Struct google_api_proto::google::cloud::tasks::v2beta2::PullMessage
source · pub struct PullMessage {
pub payload: Bytes,
pub tag: String,
}
Expand description
The pull message contains data that can be used by the caller of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task.
This proto can only be used for tasks in a queue which has [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] set.
Fields§
§payload: Bytes
A data payload consumed by the worker to execute the task.
tag: String
The task’s tag.
Tags allow similar tasks to be processed in a batch. If you label tasks with a tag, your worker can [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the same tag using [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, if you want to aggregate the events associated with a specific user once a day, you could tag tasks with the user ID.
The task’s tag can only be set when the [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
The tag must be less than 500 characters.
SDK compatibility: Although the SDK allows tags to be either string or bytes, only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn’t UTF-8 encoded, the tag will be empty when the task is returned by Cloud Tasks.
Trait Implementations§
source§impl Clone for PullMessage
impl Clone for PullMessage
source§fn clone(&self) -> PullMessage
fn clone(&self) -> PullMessage
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PullMessage
impl Debug for PullMessage
source§impl Default for PullMessage
impl Default for PullMessage
source§impl Message for PullMessage
impl Message for PullMessage
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for PullMessage
impl PartialEq for PullMessage
source§fn eq(&self, other: &PullMessage) -> bool
fn eq(&self, other: &PullMessage) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for PullMessage
Auto Trait Implementations§
impl !Freeze for PullMessage
impl RefUnwindSafe for PullMessage
impl Send for PullMessage
impl Sync for PullMessage
impl Unpin for PullMessage
impl UnwindSafe for PullMessage
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request