inputbeats

package
v0.0.0-...-c13075e Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 10 Imported by: 0

README

gogstash input beats

Synopsis

input:
  # type Must be "beats"
  - type: "beats"

    # (required) server port
    port: 5044

    # (optional) SO_REUSEPORT applied or not, default: false
    reuseport: false

    # (optional) server host, default: "0.0.0.0"
    host: "0.0.0.0"

    # (optional) Enable ssl transport, default: false
    ssl: false

    # SSL certificate file to use.
    #ssl_certificate:

    # SSL key file to use.
    #ssl_key:

    # SSL Verify, default: false
    #ssl_verify: false

Documentation

Index

Constants

View Source
const ModuleName = "beats"

ModuleName is the name used in config file

Variables

This section is empty.

Functions

func InitHandler

func InitHandler(
	ctx context.Context,
	raw config.ConfigRaw,
	control config.Control,
) (config.TypeInputConfig, error)

InitHandler initialize the input plugin

Types

type InputConfig

type InputConfig struct {
	config.InputConfig

	// The IP address to listen on, defaults to "0.0.0.0"
	Host string `json:"host"`
	// The port to listen on.
	Port int `json:"port"`
	// Here we enable SO_REUSEPORT, see more information:
	// https://github.com/libp2p/go-reuseport
	ReusePort bool `json:"reuseport"`

	// Enable ssl transport, defaults to false
	SSL bool `json:"ssl"`
	// SSL certificate to use.
	SSLCertificate string `json:"ssl_certificate"`
	// SSL key to use.
	SSLKey string `json:"ssl_key"`
	// SSL Verify, defaults to false
	SSLVerify bool `json:"ssl_verify"`
	// contains filtered or unexported fields
}

InputConfig holds the configuration json fields and internal objects

func DefaultInputConfig

func DefaultInputConfig() InputConfig

DefaultInputConfig returns an InputConfig struct with default values

func (*InputConfig) Start

func (t *InputConfig) Start(ctx context.Context, msgChan chan<- logevent.LogEvent) (err error)

Start wraps the actual function starting the plugin

Jump to

Keyboard shortcuts

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