Documentation ¶
Index ¶
- Variables
- func LoadTLSConfig(config *TLSConfig) (*transport.TLSConfig, error)
- func RegisterOutputPlugin(name string, builder OutputBuilder)
- type BulkOutputer
- type CertificateConfig
- type Data
- type Options
- type OutputBuilder
- type OutputInterface
- type OutputPlugin
- type Outputer
- type TLSConfig
- type TopologyOutputer
- type Values
Constants ¶
This section is empty.
Variables ¶
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") )
Functions ¶
func LoadTLSConfig ¶
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, data []Data) 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 CertificateConfig ¶
type Data ¶
type Data struct { // Holds the beats published event and MUST be used read-only manner only in // output plugins. Event common.MapStr // `Values` can be used to store additional context-dependent metadata // within Data. With `Data` being copied to each output, it is safe to update // `Data.Values` itself in outputs, but access to actually stored values must // be thread-safe: read-only if key might be shared or read/write if value key // is local to output plugin. Values *Values }
Data contains the Event and additional values shared/populated by outputs to share state internally in output plugins for example between retries.
Values of type Data are pushed by value inside the publisher chain up to the outputs. If multiple outputs are configured, each will receive a copy of Data elemets.
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 ¶
func InitOutputs ¶
type TLSConfig ¶
type TLSConfig struct { Enabled *bool `config:"enabled"` VerificationMode transport.TLSVerificationMode `config:"verification_mode"` // one of 'none', 'full' Versions []transport.TLSVersion `config:"supported_protocols"` CipherSuites []tlsCipherSuite `config:"cipher_suites"` CAs []string `config:"certificate_authorities"` Certificate CertificateConfig `config:",inline"` CurveTypes []tlsCurveType `config:"curve_types"` }
TLSConfig defines config file options for TLS clients.
type TopologyOutputer ¶
type Values ¶
type Values struct {
// contains filtered or unexported fields
}
Values is a recursive key/value store for use by output plugins and publisher pipeline to share context-dependent values.
func (*Values) Append ¶
Append creates new key/value store from existing store by adding a new key/value pair potentially shadowing an already present key/value pair.
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. |