tcp

package module
v0.0.0-...-654b96d Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2021 License: MIT Imports: 12 Imported by: 0

README

beats-tcp-output

How To Use

  1. Clone this project to elastic/beats/libbeat/output/

  2. Modify elastic/beats/libbeat/publisher/includes/includes.go :

    // add import
    import _ "github.com/elastic/beats/libbeat/output/tcp"
    
  3. Compile beats

Configuration

Example
output.tcp:
  host: 127.0.0.1
  port: 8080
  ssl:
    enable: true
    cert_path: ...
    key_path: ...
  buffer_size: 1024
  writev: false
  line_delimiter: \n
  codec: ...
Options
buffer_size

The buffer size of bufio.Writer and net.Buffers. Default 1<<15 (32768).

writev

Whether enable writev (a batch write optimization to reduce syscall). Default true.

line_delimiter

Specify the characters used to split the output events. Default \n.

codec

Output codec configuration. If the codec section is missing, events will be json encoded using the pretty option.

See Change the output codec for more information.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host string `config:"host"`
	Port string `config:"port"`

	BufferSize   int    `config:"buffer_size"`
	WritevEnable bool   `config:"writev"`
	SSLEnable    bool   `config:"ssl.enable"`
	SSLCertPath  string `config:"ssl.cert_path"`
	SSLKeyPath   string `config:"ssl.key_path"`

	Codec codec.Config `config:"codec"`
	// contains filtered or unexported fields
}

func (*Config) Validate

func (c *Config) Validate() error

Jump to

Keyboard shortcuts

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