pubsub

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSubscriptionIfNotExists

func CreateSubscriptionIfNotExists(
	ctx context.Context,
	client *pubsub.Client,
	subscription string,
	topic *pubsub.Topic,
	config *pubsub.SubscriptionConfig,
) (*pubsub.Subscription, error)

func CreateTopicIfNotExists

func CreateTopicIfNotExists(ctx context.Context, client *pubsub.Client, topic string) (*pubsub.Topic, error)

func NewClient

func NewClient(ctx context.Context, projectID string, options ...option.ClientOption) (*pubsub.Client, error)

func Publish

func Publish(ctx context.Context, client *pubsub.Client, topic string, message interface{}) (string, error)

func SubscribeToTopic

func SubscribeToTopic(
	ctx context.Context,
	client *pubsub.Client,
	topic string,
	subscription string,
	deadline time.Duration,
	sync bool,
	maxOutstandingMessages int,
	fx func(ctx context.Context, msg *pubsub.Message),
) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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