outputs

package
v5.0.0-alpha5+incompat... Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotACertificate indicates a PEM file to be loaded not being a valid
	// PEM file or certificate.
	ErrNotACertificate = errors.New("file is not a certificate")

	// ErrCertificateNoKey indicate a configuration error with missing key file
	ErrCertificateNoKey = errors.New("key file not configured")

	// ErrKeyNoCertificate indicate a configuration error with missing certificate file
	ErrKeyNoCertificate = errors.New("certificate file not configured")

	// ErrInvalidTLSVersion indicates an unknown tls version string given.
	ErrInvalidTLSVersion = errors.New("invalid TLS version string")

	// ErrUnknownCipherSuite indicates an unknown tls cipher suite being used
	ErrUnknownCipherSuite = errors.New("unknown cypher suite")

	// ErrUnknownCurveID indicates an unknown curve id has been configured
	ErrUnknownCurveID = errors.New("unknown curve id")
)

Functions

func LoadTLSConfig

func LoadTLSConfig(config *TLSConfig) (*tls.Config, error)

LoadTLSConfig will load a certificate from config with all TLS based keys defined. If Certificate and CertificateKey are configured, client authentication will be configured. If no CAs are configured, the host CA will be used by go built-in TLS support.

func RegisterOutputPlugin

func RegisterOutputPlugin(name string, builder OutputBuilder)

Types

type BulkOutputer

type BulkOutputer interface {
	Outputer
	BulkPublish(sig op.Signaler, opts Options, event []common.MapStr) error
}

BulkOutputer adds BulkPublish to publish batches of events without looping. Outputers still might loop on events or use more efficient bulk-apis if present.

func CastBulkOutputer

func CastBulkOutputer(out Outputer) BulkOutputer

CastBulkOutputer casts out into a BulkOutputer if out implements the BulkOutputer interface. If out does not implement the interface an outputer wrapper implementing the BulkOutputer interface is returned.

type Options

type Options struct {
	Guaranteed bool
}

type OutputBuilder

type OutputBuilder func(beatName string, config *common.Config, topologyExpire int) (Outputer, error)

Create and initialize the output plugin

func FindOutputPlugin

func FindOutputPlugin(name string) OutputBuilder

type OutputInterface

type OutputInterface interface {
	Outputer
	TopologyOutputer
}

Functions to be exported by a output plugin

type OutputPlugin

type OutputPlugin struct {
	Name   string
	Config *common.Config
	Output Outputer
}

func InitOutputs

func InitOutputs(
	beatName string,
	configs map[string]*common.Config,
	topologyExpire int,
) ([]OutputPlugin, error)

type Outputer

type Outputer interface {
	// Publish event
	PublishEvent(sig op.Signaler, opts Options, event common.MapStr) error

	Close() error
}

type TLSConfig

type TLSConfig struct {
	Certificate    string   `config:"certificate"`
	CertificateKey string   `config:"certificate_key"`
	CAs            []string `config:"certificate_authorities"`
	Insecure       bool     `config:"insecure"`
	CipherSuites   []string `config:"cipher_suites"`
	MinVersion     string   `config:"min_version"`
	MaxVersion     string   `config:"max_version"`
	CurveTypes     []string `config:"curve_types"`
}

TLSConfig defines config file options for TLS clients.

func (*TLSConfig) Validate

func (c *TLSConfig) Validate() error

type TopologyOutputer

type TopologyOutputer interface {
	// Register the agent name and its IPs to the topology map
	PublishIPs(name string, localAddrs []string) error

	// Get the agent name with a specific IP from the topology map
	GetNameByIP(ip string) string
}

Directories

Path Synopsis
Package mode defines and implents output strategies with failover or load balancing modes for use by output plugins.
Package mode defines and implents output strategies with failover or load balancing modes for use by output plugins.
lb

Jump to

Keyboard shortcuts

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