beats: github.com/elastic/beats/filebeat/inputsource/udp Index | Files

package udp

import "github.com/elastic/beats/filebeat/inputsource/udp"

Index

Package Files

config.go server.go

Constants

const Name = "udp"

Name is the human readable name and identifier.

type Config Uses

type Config struct {
    Host           string           `config:"host"`
    MaxMessageSize cfgtype.ByteSize `config:"max_message_size" validate:"positive,nonzero"`
    Timeout        time.Duration    `config:"timeout"`
    ReadBuffer     cfgtype.ByteSize `config:"read_buffer" validate:"positive,nonzero"`
}

Config options for the UDPServer

type Server Uses

type Server struct {
    Listener *net.UDPConn
    // contains filtered or unexported fields
}

Server creates a simple UDP Server and listen to a specific host:port and will send any event received to the callback method.

func New Uses

func New(config *Config, callback inputsource.NetworkFunc) *Server

New returns a new UDPServer instance.

func (*Server) Start Uses

func (u *Server) Start() error

Start starts the UDP Server and listen to incoming events.

func (*Server) Stop Uses

func (u *Server) Stop()

Stop stops the current udp server.

Package udp imports 9 packages (graph) and is imported by 24 packages. Updated 2019-04-20. Refresh now. Tools for package owners.