output

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 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 AzureBlobStorageOptions

type AzureBlobStorageOptions struct {
	Container string // Container name. Will create it if it does not exists.
	Blob      string // Blob name to use, will be created inside the container.
	Port      string // Need port number for tests, to update the connection string
}

type AzureEventHubOptions

type AzureEventHubOptions struct {
	FullyQualifiedNamespace string // The FullyQualifiedNamespace is the Event Hubs namespace name (ex: myeventhub.servicebus.windows.net)
	EventHubName            string // The name of the Event hub
	ConnectionString        string // The connection string to connect to the Event Hub
}

type Factory

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

type GCPPubsubOptions

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 GcsOptions

type GcsOptions struct {
	ProjectID         string // Project ID, needs to be unique with multiple buckets of the same name.
	ObjectContentType string // The content-type set for the object that is created in the bucket, defaults to application/json
	Bucket            string // Bucket name. Will create it if do not exist.
	Object            string // Name of the object created inside the related Bucket.
}

type KafkaOptions

type KafkaOptions struct {
	Topic string // Topic name. Will create it if not exists.
}

type LumberjackOptions

type LumberjackOptions struct {
	ParseJSON bool // Parse the input bytes as JSON and send structured data. By default, input bytes are sent in a 'message' field.
}

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.
	MaxLogLineSize int           // Log reader buffer size in bytes.

	WebhookOptions
	GCPPubsubOptions
	KafkaOptions
	AzureBlobStorageOptions
	AzureEventHubOptions
	LumberjackOptions
	GcsOptions
}

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.
	Timeout     time.Duration // Timeout for request handling.
}

Directories

Path Synopsis
Licensed to Elasticsearch B.V. under one or more agreements.
Licensed to Elasticsearch B.V. under one or more agreements.
Licensed to Elasticsearch B.V. under one or more agreements.
Licensed to Elasticsearch B.V. under one or more agreements.
Licensed to Elasticsearch B.V. under one or more agreements.
Licensed to Elasticsearch B.V. under one or more agreements.
Licensed to Elasticsearch B.V. under one or more agreements.
Licensed to Elasticsearch B.V. under one or more agreements.
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