luci: Index | Files

package logdog

import ""

Package logdog implements output to a Logdog server via PubSub.


Package Files

doc.go output.go pubsubOutput.go

func Scopes Uses

func Scopes() []string

Scopes returns the set of OAuth scopes required for this Output.

type Config Uses

type Config struct {
    // Auth is the Authenticator to use for registration and publishing. It should
    // be configured to hold the scopes returned by Scopes.
    Auth *auth.Authenticator

    // Host is the name of the LogDog Host to connect to.
    Host string

    // Project is the project that this stream belongs to.
    Project string
    // Prefix is the stream prefix to register.
    Prefix types.StreamName
    // PrefixExpiration is the prefix expiration to use when registering.
    // If zero, no expiration will be expressed to the Coordinator, and it will
    // choose based on its configuration.
    PrefixExpiration time.Duration

    // SourceInfo, if not empty, is auxiliary source information to register
    // alongside the stream.
    SourceInfo []string

    // PublishContext is the special Context to use for publishing messages. If
    // nil, the Context supplied to Register will be used.
    // This is useful when the Context supplied to Register responds to
    // cancellation (e.g., user sends SIGTERM), but we might not want to
    // immediately cancel pending publishes due to flushing.
    PublishContext context.Context

    // RPCTimeout, if > 0, is the timeout to apply to an individual RPC.
    RPCTimeout time.Duration

Config is the set of configuration parameters for this Output instance.

func (*Config) Register Uses

func (cfg *Config) Register(c context.Context) (output.Output, error)

Register registers the supplied Prefix with the Coordinator. Upon success, an Output instance bound to that stream will be returned.

Package logdog imports 28 packages (graph) and is imported by 3 packages. Updated 2020-12-06. Refresh now. Tools for package owners.