Documentation ¶
Index ¶
Constants ¶
View Source
const ( AttrMessageID = "_ps_message_id" AttrMessagePublishTime = "_ps_message_publishtime" )
These constants contain well-known keys for attributes.
View Source
const MessagePublishTimeFormat = time.RFC3339
MessagePublishTimeFormat is the round trip time format for the publish time attribute.
Variables ¶
This section is empty.
Functions ¶
func MessageID ¶
func MessageID(atts msg.Attributes) string
MessageID returns the pub/sub ID of the original message.
func MessagePublishTime ¶
func MessagePublishTime(atts msg.Attributes) time.Time
MessagePublishTime returns the pub/sub publish time of the original message.
func NewServer ¶
NewServer returns a server implementation for Google's Cloud Pub/Sub.
Serve will only receive messages currently in the subscription and then exit. This is currently a limitation in the SDK for Cloud Pub/Sub Pull model. In the future Serve may instead iterate and add a sleep to emulate more of a Push model or support an HTTPS endpoint to use Pub/Sub's push.
Types ¶
Click to show internal directories.
Click to hide internal directories.