Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFoundRule = errors.New("rule is not found") ErrConvertRuleToJson = errors.New("failed conversion rule to json") ErrExpiredTrace = errors.New("expired trace") )
Error messages which can be returned by ruler.
Functions ¶
This section is empty.
Types ¶
type CountRulerNlErrMemEvent ¶
CountRulerNlErrMemEvent -
type Deps ¶
type Deps struct { // Adapters AgentSubject observer.Subject NlWatcher NetlinkWatcher }
Deps - dependency
type NetlinkWatcher ¶
RuleTracer - common interface for the rule trace
type RuleCache ¶
type RuleCache struct {
// contains filtered or unexported fields
}
RuleCache - cache to store nftables rules
func NewRuleCache ¶
NewRuleCache - creator for the cache
func (*RuleCache) GetRule ¶
func (r *RuleCache) GetRule(k RuleEntryKey) (RuleEntry, bool)
Get rule by key
func (*RuleCache) InsertRule ¶
InsertRule insert rule into cache
type RuleEntryKey ¶
type RuleEntryKey struct { TableName string TableFamily nftLib.TableFamily ChainName string Handle uint64 }
type RuleTracer ¶
type RuleTracer interface { Run(ctx context.Context) (err error) GetRuleForTrace(tr *model.NetlinkTrace) (re RuleEntry, err error) Close() error }
RuleTracer - common interface for the rule trace
func NewRuleTrace ¶
func NewRuleTrace(d Deps) (rt RuleTracer)
Click to show internal directories.
Click to hide internal directories.