ps

package
v0.0.0-...-1ce0fe2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSubscription

func CreateSubscription(args PubSubArguments) error

func CreateTopic

func CreateTopic(args PubSubArguments) error

func Publish

func Publish(args PubSubArguments) error

func Pull

func Pull(args PubSubArguments) error

func PullPush

func PullPush(args PubSubArguments) error

Pull messages from a Subscription and Push them to an endpoint.

Types

type PubSubArguments

type PubSubArguments struct {
	Project            string
	File               string
	Topic              string
	Subscription       string
	UseEmulator        bool
	PushURL            string
	AlwaysACK          bool
	AbortOnError       bool
	SubscriptionFilter string
}

type PubSubMessage

type PubSubMessage struct {
	Message struct {
		Data       []byte            `json:"data,omitempty"`
		Attributes map[string]string `json:"attributes"`
		ID         string            `json:"id"`
	} `json:"message"`
	MessageId    string `json:"messageId"`
	Subscription string `json:"subscription"`
}

PubSubMessage is the payload of a Pub/Sub event. See the documentation for more details: https://cloud.google.com/pubsub/docs/reference/rest/v1/PubsubMessage

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL