rule

package
v0.14.1-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	URL() *url.URL
}

type Executor

type Executor interface {
	Execute(ctx heimdall.Context) (Backend, error)
}

type Factory

type Factory interface {
	CreateRule(version, srcID string, ruleConfig config.Rule) (Rule, error)
	DefaultRule() Rule
	HasDefaultRule() bool
}

type Repository

type Repository interface {
	FindRule(toMatch *url.URL) (Rule, error)
}

type Rule

type Rule interface {
	ID() string
	SrcID() string
	Execute(ctx heimdall.Context) (Backend, error)
	MatchesURL(match *url.URL) bool
	MatchesMethod(method string) bool
}

type SetProcessor

type SetProcessor interface {
	OnCreated(ruleSet *config.RuleSet) error
	OnUpdated(ruleSet *config.RuleSet) error
	OnDeleted(ruleSet *config.RuleSet) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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