pubsubx

package
v2.6.0-RC1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2018 License: Apache-2.0, BSD-3-Clause, MIT Imports: 5 Imported by: 0

Documentation

Overview

Package pubsubx contains utilities for working with Google PubSub.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupTopic

func CleanupTopic(ctx context.Context, project, topic string)

CleanupTopic deletes a topic with all subscriptions and logs any error. Useful for defer.

func EnsureSubscription

func EnsureSubscription(ctx context.Context, client *pubsub.Client, topic, id string) (*pubsub.Subscription, error)

EnsureSubscription creates a new subscription with the given name, if it doesn't exist.

func EnsureTopic

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

EnsureTopic creates a new topic, if it doesn't exist.

func MakeQualifiedSubscriptionName

func MakeQualifiedSubscriptionName(project, subscription string) string

MakeQualifiedSubscriptionName returns a fully-qualified subscription name for the given project and subscription id.

func MakeQualifiedTopicName

func MakeQualifiedTopicName(project, topic string) string

MakeQualifiedTopicName returns a fully-qualified topic name for the given project and topic.

func Publish

func Publish(ctx context.Context, project, topic string, messages ...string) (*pubsub.Subscription, error)

Publish is a simple utility for publishing a set of string messages serially to a pubsub topic. Small scale use only.

Types

This section is empty.

Jump to

Keyboard shortcuts

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