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

package logdog

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

Index

Package Files

output.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 types.ProjectName
    // 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

    // Track, if true, instructs this Output instance to track all log entries
    // that have been sent in-memory. This is useful for debugging.
    Track bool
}

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 20 packages (graph) and is imported by 2 packages. Updated 2018-10-22. Refresh now. Tools for package owners.