pubsub

package
v0.0.0-...-678bb0e Latest Latest
Warning

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

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

Documentation

Overview

Package pubsub implements the "pubsub" Output.

The "pubsub" (Google Cloud Pub/Sub) Output publishes ButlerLogBundle protobufs to a Google Cloud Pub/Sub topic using the protocol defined in:

github.com/luci/luci-go/common/logdog/butlerproto

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, c Config) output.Output

New instantiates a new GCPS output.

Types

type Config

type Config struct {
	// Topic is the Pub/Sub topic to publish to.
	Topic Topic

	// Secret, if not nil, is the prefix secret to attach to each outgoing bundle.
	Secret types.PrefixSecret

	// Compress, if true, enables zlib compression.
	Compress bool

	// Track, if true, tracks all log entries that have been successfully
	// submitted.
	Track bool

	// RPCTimeout is the timeout to apply to an individual RPC.
	RPCTimeout time.Duration
}

Config is a configuration structure for Pub/Sub output.

type Topic

type Topic interface {
	// String returns the name of the topic.
	String() string

	// Publish mirrors the pubsub.Connection Publish method.
	Publish(context.Context, *pubsub.Message) (string, error)
}

Topic is an interface for a Pub/Sub topic.

pubsub.Topic implements Topic.

Jump to

Keyboard shortcuts

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