cache

package
v0.0.0-...-2572d14 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RegCache

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

func NewRegisters

func NewRegisters() *RegCache

func (*RegCache) GetExpr

func (r *RegCache) GetExpr(reg uint32) (RegEntry, bool)

GetExpr expression by register

func (*RegCache) InsertExpr

func (r *RegCache) InsertExpr(reg uint32, expr RegEntry)

InsertExpr insert expression into cache by register

func (*RegCache) RmExpr

func (r *RegCache) RmExpr(reg uint32)

RmExpr remove expression by register

type RegEntry

type RegEntry struct {
	Expr    expr.Any
	ExprStr string
	Any     any
	Len     uint32
	Op      string
}

type SetCache

type SetCache struct {
	// contains filtered or unexported fields
}
var SetsHolder SetCache

func (*SetCache) GetSet

func (r *SetCache) GetSet(key SetKey) (*SetEntry, bool)

GetSet get ste by key

func (*SetCache) InsertSet

func (r *SetCache) InsertSet(key SetKey, val *SetEntry)

InsertSet insert set into cache by key

func (*SetCache) RmSet

func (r *SetCache) RmSet(key SetKey)

RmSet remove set by key

type SetEntry

type SetEntry struct {
	nftables.Set
	Elements []nftables.SetElement
}

type SetKey

type SetKey struct {
	TableName string
	SetName   string
	SetId     uint32
}

Jump to

Keyboard shortcuts

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