beam: github.com/apache/beam/sdks/go/pkg/beam/util/pubsubx Index | Files

package pubsubx

import "github.com/apache/beam/sdks/go/pkg/beam/util/pubsubx"

Package pubsubx contains utilities for working with Google PubSub.

Index

Package Files

pubsub.go

func CleanupTopic Uses

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

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

func EnsureSubscription Uses

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 Uses

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 Uses

func MakeQualifiedSubscriptionName(project, subscription string) string

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

func MakeQualifiedTopicName Uses

func MakeQualifiedTopicName(project, topic string) string

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

func Publish Uses

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.

Package pubsubx imports 6 packages (graph) and is imported by 2 packages. Updated 2019-05-28. Refresh now. Tools for package owners.