producer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Timestamp time.Time   `json:"timestamp,omitempty"`
	SrcHost   string      `json:"srcHost,omitempty"`
	SrcPort   string      `json:"srcPort,omitempty"`
	DstPort   uint16      `json:"dstPort,omitempty"`
	SensorID  string      `json:"sensorID,omitempty"`
	Rule      string      `json:"rule,omitempty"`
	Handler   string      `json:"handler,omitempty"`
	Payload   string      `json:"payload,omitempty"`
	Scanner   string      `json:"scanner,omitempty"`
	Decoded   interface{} `json:"decoded,omitempty"`
}

Event is a struct for glutton events

type Producer

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

Producer for the producer

func New

func New(sensorID string) (*Producer, error)

New initializes the producers

func (*Producer) LogTCP

func (p *Producer) LogTCP(handler string, conn net.Conn, md *connection.Metadata, payload []byte, decoded interface{}) error

LogTCP is a meta caller for all producers

func (*Producer) LogUDP

func (p *Producer) LogUDP(handler string, srcAddr, dstAddr *net.UDPAddr, md *connection.Metadata, payload []byte, decoded interface{}) error

LogUDP is a meta caller for all producers

Jump to

Keyboard shortcuts

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