luci: go.chromium.org/luci/logdog/client/butler/output/pubsub Index | Files

package pubsub

import "go.chromium.org/luci/logdog/client/butler/output/pubsub"

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:

go.chromium.org/luci/common/logdog/butlerproto

Index

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 2018-08-14. Refresh now. Tools for package owners.