luci: Index | Files

package pubsub

import ""

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:


Package Files

doc.go pubsubOutput.go

func New Uses

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

New instantiates a new GCPS output.

type Config Uses

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 Uses

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.

Package pubsub imports 18 packages (graph) and is imported by 2 packages. Updated 2019-08-17. Refresh now. Tools for package owners.