Documentation ¶
Index ¶
- func Logger(customLogger zerolog.Logger)
- type Queue
- func (q *Queue) Bind() (uint32, error)
- func (q *Queue) CacheAction(packet gopacket.Packet, rule string, action types.NFQActionType)
- func (q *Queue) CacheConnection(packet gopacket.Packet)
- func (q *Queue) Connections() (m map[string]*model.Connection)
- func (q *Queue) Dropped() (m map[string]*model.Notification)
- func (q *Queue) Handle(attr nfqueue.Attribute) int
- func (q *Queue) LockDB()
- func (q *Queue) Register(ctx context.Context) error
- func (q *Queue) ResetDB()
- func (q *Queue) Start() error
- func (q *Queue) Stop() error
- func (q *Queue) Unbind() error
- func (q *Queue) UnlockDB()
- func (q *Queue) UpdateExceptions(exceptions model.Exceptions)
- func (q *Queue) UpdatePatterns(patterns model.Patterns)
- type QueueVerdictOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Queue ¶
type Queue struct { ID uint16 // contains filtered or unexported fields }
func (*Queue) CacheAction ¶
func (*Queue) CacheConnection ¶
func (*Queue) Connections ¶
func (q *Queue) Connections() (m map[string]*model.Connection)
Connections will lock the db struct and copy the connection map
func (*Queue) Dropped ¶
func (q *Queue) Dropped() (m map[string]*model.Notification)
Dropped will lock the db struct and copy the dropped map
func (*Queue) Handle ¶
NOTE always return zero otherwise the handler will be closed NOTE removed all logging in favor of performance
func (*Queue) LockDB ¶
func (q *Queue) LockDB()
LockDB will lock the mutex on the internal db struct in case we want to copy the maps savely
func (*Queue) ResetDB ¶
func (q *Queue) ResetDB()
ResetDB will reset the db struct content which is necessary to release memory
func (*Queue) UnlockDB ¶
func (q *Queue) UnlockDB()
UnlockDB will unlock the mutex on the internal db struct
func (*Queue) UpdateExceptions ¶
func (q *Queue) UpdateExceptions(exceptions model.Exceptions)
UpdateExceptions will skip or add IP and DNS addresses from the blocklist
func (*Queue) UpdatePatterns ¶
UpdatePatterns will create the blocklists for IP and DNS addresses
type QueueVerdictOpts ¶
Click to show internal directories.
Click to hide internal directories.