collectors

package
v0.12.0-b1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyBpfFilter

func ApplyBpfFilter(filter []bpf.Instruction, fd int) (err error)

func GetBpfFilter

func GetBpfFilter(port int) []bpf.Instruction

func Htons

func Htons(v uint16) int

Convert a uint16 to host byte order (big endian)

func RemoveBpfFilter

func RemoveBpfFilter(fd int) (err error)

Types

type DnsSniffer

type DnsSniffer struct {
	// contains filtered or unexported fields
}

func NewDnsSniffer

func NewDnsSniffer(loggers []dnsutils.Worker, config *dnsutils.Config, logger *logger.Logger) *DnsSniffer

func (*DnsSniffer) Channel

func (c *DnsSniffer) Channel() chan dnsutils.DnsMessage

func (*DnsSniffer) Listen added in v0.3.0

func (c *DnsSniffer) Listen() error

func (*DnsSniffer) LogError

func (c *DnsSniffer) LogError(msg string, v ...interface{})

func (*DnsSniffer) LogInfo

func (c *DnsSniffer) LogInfo(msg string, v ...interface{})

func (*DnsSniffer) Loggers added in v0.3.0

func (c *DnsSniffer) Loggers() []chan dnsutils.DnsMessage

func (*DnsSniffer) ReadConfig

func (c *DnsSniffer) ReadConfig()

func (*DnsSniffer) Run

func (c *DnsSniffer) Run()

func (*DnsSniffer) Stop

func (c *DnsSniffer) Stop()

type Dnstap added in v0.3.0

type Dnstap struct {
	// contains filtered or unexported fields
}

func NewDnstap added in v0.3.0

func NewDnstap(loggers []dnsutils.Worker, config *dnsutils.Config, logger *logger.Logger) *Dnstap

func (*Dnstap) Channel added in v0.3.0

func (c *Dnstap) Channel() chan dnsutils.DnsMessage

func (*Dnstap) HandleConn added in v0.3.0

func (c *Dnstap) HandleConn(conn net.Conn)

func (*Dnstap) Listen added in v0.3.0

func (c *Dnstap) Listen() error

func (*Dnstap) LogError added in v0.3.0

func (o *Dnstap) LogError(msg string, v ...interface{})

func (*Dnstap) LogInfo added in v0.3.0

func (o *Dnstap) LogInfo(msg string, v ...interface{})

func (*Dnstap) Loggers added in v0.3.0

func (c *Dnstap) Loggers() []chan dnsutils.DnsMessage

func (*Dnstap) ReadConfig added in v0.3.0

func (c *Dnstap) ReadConfig()

func (*Dnstap) Run added in v0.3.0

func (c *Dnstap) Run()

func (*Dnstap) Stop added in v0.3.0

func (c *Dnstap) Stop()

type Tail added in v0.5.0

type Tail struct {
	// contains filtered or unexported fields
}

func NewTail added in v0.5.0

func NewTail(loggers []dnsutils.Worker, config *dnsutils.Config, logger *logger.Logger) *Tail

func (*Tail) Channel added in v0.5.0

func (c *Tail) Channel() chan dnsutils.DnsMessage

func (*Tail) Follow added in v0.5.0

func (c *Tail) Follow() error

func (*Tail) LogError added in v0.5.0

func (o *Tail) LogError(msg string, v ...interface{})

func (*Tail) LogInfo added in v0.5.0

func (o *Tail) LogInfo(msg string, v ...interface{})

func (*Tail) Loggers added in v0.5.0

func (c *Tail) Loggers() []chan dnsutils.DnsMessage

func (*Tail) ReadConfig added in v0.5.0

func (c *Tail) ReadConfig()

func (*Tail) Run added in v0.5.0

func (c *Tail) Run()

func (*Tail) Stop added in v0.5.0

func (c *Tail) Stop()

Jump to

Keyboard shortcuts

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