pubsub

package
v1.38.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Subscribe

func Subscribe(
	ctx context.Context,
	project string,
	prefix string,
	topic string,
	worker func(ctx context.Context, msg *pubsub.Message) error,
) error

Subscribe does the following: 1) Create a subscriber within the instance. 2) Start a receiver in a goroutine. 3) Have a goroutine to delete the subscriber on server shutdown.

TODO(shifucun): Add unittest.

Types

This section is empty.

Jump to

Keyboard shortcuts

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