output

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 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 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.

	WebhookOptions
}

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

Jump to

Keyboard shortcuts

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