output

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Available

func Available() []string

func Register

func Register(protocol string, factory Factory)

Types

type Factory

type Factory func(options *Options) (Output, error)

type GCPPubsubOptions added in v0.3.0

type GCPPubsubOptions struct {
	Project      string // Project name.
	Topic        string // Topic name. Will create it if not exists.
	Subscription string // Subscription name. Will create it if not exists.
	Clear        bool   // Clear will clear all topics and subscriptions before running.
}

type Options

type Options struct {
	Addr        string        // Destination address (host:port).
	Delay       time.Duration // Delay start after start signal.
	Protocol    string        // Protocol (udp/tcp/tls).
	Retries     int           // Number of connection retries for tcp based protocols.
	StartSignal string        // OS signal to wait on before starting.
	InsecureTLS bool          // Disable TLS verification checks.
	RateLimit   int           // UDP rate limit in bytes.

	WebhookOptions
	GCPPubsubOptions
}

type Output

type Output interface {
	DialContext(ctx context.Context) error
	io.WriteCloser
}

func Initialize

func Initialize(opts *Options, logger *zap.SugaredLogger, ctx context.Context) (Output, error)

func New

func New(opts *Options) (Output, error)

type WebhookOptions

type WebhookOptions struct {
	ContentType string   // Content-Type header.
	Headers     []string // Headers in Key=Value format.
	Username    string   // Basic auth username.
	Password    string   // Basic auth password.
}

Directories

Path Synopsis
Licensed to Elasticsearch B.V. under one or more agreements.
Licensed to Elasticsearch B.V. under one or more agreements.

Jump to

Keyboard shortcuts

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