logic

package
v0.0.0-...-27598f0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

func NewEngine

func NewEngine() *Engine

func (*Engine) FlowCount

func (x *Engine) FlowCount() int

func (*Engine) Flush

func (x *Engine) Flush() *model.Record

func (*Engine) InputPacket

func (x *Engine) InputPacket(pkt gopacket.Packet) (*model.Record, error)

func (*Engine) Tick

func (x *Engine) Tick(now time.Time) (*model.Record, error)

type FlowMap

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

func NewFlowMap

func NewFlowMap() *FlowMap

func (*FlowMap) Expire

func (x *FlowMap) Expire(at time.Time) []*model.Flow

func (*FlowMap) Flush

func (x *FlowMap) Flush() []*model.Flow

func (*FlowMap) Get

func (x *FlowMap) Get(key model.FlowKey) *model.Flow

func (*FlowMap) Len

func (x *FlowMap) Len() int

func (*FlowMap) Put

func (x *FlowMap) Put(flow *model.Flow) bool

type Option

type Option func(*Engine)

func WithTimeout

func WithTimeout(d time.Duration) Option

Jump to

Keyboard shortcuts

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