logdog

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: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Scopes

func Scopes() []string

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

Types

type Config

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 cfgtypes.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

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.

Jump to

Keyboard shortcuts

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