gcppubsub

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MPL-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cnf *config.Config, projectID, subscriptionName string) (iface.Broker, error)

New creates new Broker instance

Types

type Broker

type Broker struct {
	common.Broker

	MaxExtension time.Duration
	// contains filtered or unexported fields
}

Broker represents an Google Cloud Pub/Sub broker

func (*Broker) Publish

func (b *Broker) Publish(ctx context.Context, signature *tasks.Signature) error

Publish places a new message on the default queue or the queue pointed to by the routing key

func (*Broker) StartConsuming

func (b *Broker) StartConsuming(consumerTag string, concurrency int, taskProcessor iface.TaskProcessor) (bool, error)

StartConsuming enters a loop and waits for incoming messages

func (*Broker) StopConsuming

func (b *Broker) StopConsuming()

StopConsuming quits the loop

Jump to

Keyboard shortcuts

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