wrapper

package
v1.19.34-clash.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: GPL-3.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DefaultNotificationInterval = 300 * time.Second

Variables

This section is empty.

Functions

func NewRuleWrapper

func NewRuleWrapper(rule C.Rule) C.RuleWrapper

func RuleNotification

func RuleNotification(params []string) (text string, interval time.Duration, ok bool)

Types

type NotifyingRule

type NotifyingRule struct {
	C.RuleWrapper
	// contains filtered or unexported fields
}

func NewNotifyingRule

func NewNotifyingRule(rule C.RuleWrapper, text string, interval time.Duration, written string) *NotifyingRule

func (*NotifyingRule) NotificationDue

func (r *NotifyingRule) NotificationDue(now time.Time) (string, bool)

func (*NotifyingRule) WrittenLine

func (r *NotifyingRule) WrittenLine() string

type RuleWrapper

type RuleWrapper struct {
	C.Rule
	// contains filtered or unexported fields
}

func (*RuleWrapper) Hit

func (r *RuleWrapper) Hit()

func (*RuleWrapper) HitAt

func (r *RuleWrapper) HitAt() time.Time

func (*RuleWrapper) HitCount

func (r *RuleWrapper) HitCount() uint64

func (*RuleWrapper) IsDisabled

func (r *RuleWrapper) IsDisabled() bool

func (*RuleWrapper) Match

func (r *RuleWrapper) Match(metadata *C.Metadata, helper C.RuleMatchHelper) (bool, string)

func (*RuleWrapper) Miss

func (r *RuleWrapper) Miss()

func (*RuleWrapper) MissAt

func (r *RuleWrapper) MissAt() time.Time

func (*RuleWrapper) MissCount

func (r *RuleWrapper) MissCount() uint64

func (*RuleWrapper) SetDisabled

func (r *RuleWrapper) SetDisabled(v bool)

func (*RuleWrapper) Unwrap

func (r *RuleWrapper) Unwrap() C.Rule

Jump to

Keyboard shortcuts

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