Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Body ¶
type Body struct { Message *Message `json:"message"` Subscription string `json:"subscription"` // DeliveryAttempt is the number of times a message has been delivered. // This is part of the dead lettering feature that forwards messages that // fail to be processed (from nack/ack deadline timeout) to a dead letter topic. // If dead lettering is enabled, this will be set on all attempts, starting // with value 1. Otherwise, the value will be nil. // This field is read-only. DeliveryAttempt int `json:"deliveryAttempt"` }
type HelloHandler ¶
type HelloHandler struct {
// contains filtered or unexported fields
}
func NewHelloHandler ¶
func NewHelloHandler(ctx context.Context, helloTopicPubSubService *PubSubService, helloOrderPubSubService *PubSubService) (*HelloHandler, error)
func (*HelloHandler) Handle ¶
func (h *HelloHandler) Handle(w http.ResponseWriter, r *http.Request)
type Message ¶
type Message struct { // ID identifies this message. This ID is assigned by the server and is // populated for Messages obtained from a subscription. // // This field is read-only. MessageID string `json:"messageId"` // Data is the actual data in the message. Data []byte `json:"data"` // Attributes represents the key-value pairs the current message is // labelled with. Attributes map[string]string `json:"attributes"` // PublishTime is the time at which the message was published. This is // populated by the server for Messages obtained from a subscription. // // This field is read-only. PublishTime time.Time `json:"publishTime"` // OrderingKey identifies related messages for which publish order should // be respected. If empty string is used, message will be sent unordered. OrderingKey string `json:"orderingKey"` }
type PubSubService ¶
type PubSubService struct {
// contains filtered or unexported fields
}
func NewPubSubService ¶
func (*PubSubService) Flush ¶
func (s *PubSubService) Flush(ctx context.Context)
func (*PubSubService) Publish ¶
func (s *PubSubService) Publish(ctx context.Context, msg *pubsub.Message) *pubsub.PublishResult
func (*PubSubService) PublishWithGet ¶
type ReceiveHandler ¶
type ReceiveHandler struct { }
func NewReceiveHandler ¶
func NewReceiveHandler(ctx context.Context) (*ReceiveHandler, error)
func (*ReceiveHandler) Handle ¶
func (h *ReceiveHandler) Handle(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.