outputsocket

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: 4 Imported by: 0

README

gogstash output socket

Synopsis

{
	"output": [
		{
			"type": "socket",

			// Socket type. Must be one of any of the types supported by net.Dial, i.e.: ["udp", "tcp", "unix", "unixpacket"].
			"socket": "tcp",

			// For TCP, address must have the form `host:port`.
			// For Unix networks, the address must be a file system path.
			"address": "localhost:9999"
		}
	]
}

Details

  • type
    • Must be "socket"
  • socket
  • address
    • Address in a format supported by net.Dial

Documentation

Index

Constants

View Source
const ModuleName = "socket"

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.TypeOutputConfig, error)

InitHandler initialize the output plugin

Types

type OutputConfig

type OutputConfig struct {
	config.OutputConfig
	Socket  string `json:"socket"`  // Type of socket, must be one of ["tcp", "unix", "unixpacket"].
	Address string `json:"address"` // For TCP, address must have the form `host:port`. For Unix networks, the address must be a file system path.
	// contains filtered or unexported fields
}

OutputConfig holds the configuration json fields and internal objects

func DefaultOutputConfig

func DefaultOutputConfig() OutputConfig

DefaultOutputConfig returns an OutputConfig struct with default values

func (*OutputConfig) Output

func (t *OutputConfig) Output(ctx context.Context, event logevent.LogEvent) error

Output event

Jump to

Keyboard shortcuts

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