plugin

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RSTNum = 3
)

Variables

This section is empty.

Functions

func IPtoByte

func IPtoByte(ipStr string) []byte

func IsPseudo

func IsPseudo(key string) bool

func IsValidDir

func IsValidDir(dirPath string) error

func SendRST added in v0.2.1

func SendRST(srcMac, dstMac net.HardwareAddr, srcIp, dstIp net.IP, srcPort, dstPort layers.TCPPort,
	seq uint32, handle *pcap.Handle) error

func SendSYN added in v0.2.1

func SendSYN(srcIp, dstIp net.IP, srcPort, dstPort layers.TCPPort, seq uint32) error

Types

type DescSrcWrapper added in v0.2.3

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

func NewDescSrcWrapper added in v0.2.3

func NewDescSrcWrapper(descSource grpcurl.DescriptorSource) *DescSrcWrapper

func (*DescSrcWrapper) AllExtensionsForType added in v0.2.3

func (s *DescSrcWrapper) AllExtensionsForType(typeName string) ([]*desc.FieldDescriptor, error)

func (*DescSrcWrapper) FindSymbol added in v0.2.3

func (s *DescSrcWrapper) FindSymbol(fullyQualifiedName string) (desc.Descriptor, error)

func (*DescSrcWrapper) ListServices added in v0.2.3

func (s *DescSrcWrapper) ListServices() ([]string, error)

type DeviceListener

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

func NewDeviceListener

func NewDeviceListener(device string, port int, rawInput *RAWInput) *DeviceListener

func (*DeviceListener) Close

func (l *DeviceListener) Close()

func (*DeviceListener) String

func (l *DeviceListener) String() string

type FileDirInput

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

func NewFileDirInput

func NewFileDirInput(codec string, path string, readDepth int, speed float64) *FileDirInput

func (*FileDirInput) Close

func (in *FileDirInput) Close() error

func (*FileDirInput) Read

func (in *FileDirInput) Read() (msg *protocol.Message, err error)

type FileDirOutput

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

func NewFileDirOutput

func NewFileDirOutput(codec string, path string, cf *FileDirOutputConfig) *FileDirOutput

func (*FileDirOutput) Close

func (o *FileDirOutput) Close() error

func (*FileDirOutput) Write

func (o *FileDirOutput) Write(msg *protocol.Message) (err error)

type FileDirOutputConfig

type FileDirOutputConfig struct {
	// MaxSize is the maximum size in megabytes of the log file before it gets rotated.
	MaxSize int `json:"maxSize"`
	// MaxBackups is the maximum number of old log files to retain.
	MaxBackups int `json:"maxBackups"`
	// MaxAge is the maximum number of days to retain old log files based on the
	// timestamp encoded in their filename.
	MaxAge int `json:"maxAge"`
}

type GRPCOutput

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

func NewGRPCOutput

func NewGRPCOutput(addr string, workerNum int) *GRPCOutput

func (*GRPCOutput) Close

func (o *GRPCOutput) Close() error

func (*GRPCOutput) Write

func (o *GRPCOutput) Write(msg *protocol.Message) (err error)

type GrpcWorker added in v0.2.3

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

func NewGrpcWorker added in v0.2.3

func NewGrpcWorker(addr string, msgChannel chan *protocol.Message, descSource grpcurl.DescriptorSource) *GrpcWorker

func (*GrpcWorker) Call added in v0.2.3

func (w *GrpcWorker) Call(msg *protocol.Message) (err error)

type RAWInput

type RAWInput struct {
	Processor *http2.Processor
	// contains filtered or unexported fields
}

RAWInput used for intercepting traffic for given address

func NewRAWInput

func NewRAWInput(address string) (*RAWInput, error)

NewRAWInput constructor for RAWInput. Accepts raw input config as arguments.

func (*RAWInput) Close

func (i *RAWInput) Close() error

Close closes the input raw listener

func (*RAWInput) Listen

func (i *RAWInput) Listen()

func (*RAWInput) Read

func (i *RAWInput) Read() (*protocol.Message, error)

PluginRead reads meassage from this plugin

type ReinforcedReader

type ReinforcedReader struct {
	sync.Mutex

	EOF bool
	// contains filtered or unexported fields
}

func NewReinforcedReader

func NewReinforcedReader(filepaths []string, codec protocol.Codec) *ReinforcedReader

func (*ReinforcedReader) Close

func (r *ReinforcedReader) Close() error

func (*ReinforcedReader) NextFile

func (r *ReinforcedReader) NextFile() error

func (*ReinforcedReader) ReadMessage

func (r *ReinforcedReader) ReadMessage() (*protocol.Message, error)

type RocketMQInput added in v0.0.5

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

func NewRocketMQInput added in v0.0.5

func NewRocketMQInput(nameServers []string, topic, groupName string, accessKey, secretKey string) (*RocketMQInput, error)

func (*RocketMQInput) Close added in v0.0.5

func (in *RocketMQInput) Close() error

func (*RocketMQInput) Read added in v0.0.5

func (in *RocketMQInput) Read() (*protocol.Message, error)

type RocketMQOutput added in v0.0.5

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

func NewRocketMQOutput added in v0.0.5

func NewRocketMQOutput(nameServers []string, topic, accessKey, secretKey string) (*RocketMQOutput, error)

func (*RocketMQOutput) Close added in v0.0.5

func (o *RocketMQOutput) Close() error

func (*RocketMQOutput) Write added in v0.0.5

func (o *RocketMQOutput) Write(msg *protocol.Message) (err error)

type StdOutput

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

func NewStdOutput

func NewStdOutput(codec string) *StdOutput

func (*StdOutput) Close

func (o *StdOutput) Close() error

func (*StdOutput) Write

func (o *StdOutput) Write(msg *protocol.Message) (err error)

Jump to

Keyboard shortcuts

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