tasks

package
v0.0.0-...-6d882ad Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: ISC Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanTopic

func CleanTopic(ctx context.Context, client *pubsub.Client, params CleanParams) error

CleanTopic will look at all subscriptions in the given topic and remove old pubsubcat temporary topics.

func ListSubscriptions

func ListSubscriptions(ctx context.Context, client *pubsub.Client, topicID string) error

ListSubscriptions outputs the request topic and all it's subscriptions

func ListTopics

func ListTopics(ctx context.Context, client *pubsub.Client, recursive bool) error

ListTopics outputs all the topics fetched from the pubsub.Client.

func Pipe

func Pipe(ctx context.Context, client *pubsub.Client, params PipeParams) error

Pipe will create a random subscription on inTopicID and forward all messages to the given outTopicID.

func Publish

func Publish(ctx context.Context, client *pubsub.Client, params PublishParams) error

Publish lines read from os.Stdin to the given topic using the given client.

func Subscribe

func Subscribe(ctx context.Context, client *pubsub.Client, params SubscribeParams) error

Subscribe will connect to pubsub, created a temporary subscription on the given topic and listens for message to output to Stdout.

Cancel the given context to stop.

Types

type CleanParams

type CleanParams struct {
	Verbosity int
	TopicID   string
}

CleanParams allows config over the Clean task.

type PipeParams

type PipeParams struct {
	Verbosity  int
	InTopicID  string
	OutTopicID string
	Blocking   bool
	Count      int
	NoCleanup  bool
}

PipeParams allows config over the Pipe task.

type PublishParams

type PublishParams struct {
	Verbosity  int
	TopicID    string
	Blocking   bool
	Attributes []string
}

PublishParams allows config over the Publish task.

type SubscribeParams

type SubscribeParams struct {
	Verbosity      int
	TopicID        string
	SubscriptionID string
	Count          int
	NoCleanup      bool
}

SubscribeParams allows config over the Subscribe task.

Jump to

Keyboard shortcuts

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