providers

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRuleNotFound  = errors.New("provider can't find a rule")
	ErrRuleIsExpired = errors.New("rule is old or expired")
)

Functions

func NewLinkProvider

func NewLinkProvider(ctx context.Context, useLogging bool) (*linkProvider, error)

func NewRuleProvider

func NewRuleProvider(ctx context.Context, useLogging bool) (*ruleProvider, error)

Types

type Link struct {
	Name  string
	Index int
}

type LinkProvider

type LinkProvider interface {
	LinkByIndex(int) (Link, error)
	Close() error
}

type RuleKey

type RuleKey struct {
	TableName   string
	TableFamily nftLib.TableFamily
	ChainName   string
	Handle      uint64
}

type RuleProvider

type RuleProvider interface {
	GetHumanRule(RuleKey) (string, error)
	Close() error
}

type RuleVal

type RuleVal struct {
	Rule  *nftLib.Rule
	Human string
	At    time.Time
	// contains filtered or unexported fields
}

func (*RuleVal) EqKey

func (rv *RuleVal) EqKey(key RuleKey) bool

Jump to

Keyboard shortcuts

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