rule

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name         string
	Query        string
	Threshold    float32
	LabelFilters []string
	Labels       map[string]string

	// Periodic type.
	EveryDay string // e.g. "00:00~23:59", or "-22:00~7:00" (yesterday 22:00 to today 07:00)

	// Watch type.
	WatchInterval time.Duration
	// contains filtered or unexported fields
}

func (*Config) Validate

func (c *Config) Validate() error

type Dependencies

type Dependencies struct {
	FeedStorage feed.Storage
	Out         chan<- *Result
}

type Factory

func NewFactory

func NewFactory(mockOn ...component.MockOption) Factory

type Result

type Result struct {
	Rule  string
	Time  time.Time
	Feeds []*block.FeedVO
}

type Rule

type Rule interface {
	component.Component
	Config() *Config
}

--- Interface code block ---

Jump to

Keyboard shortcuts

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