rule

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetService = func() RuleService {
	return &ruleServiceImpl{}
}
View Source
var GetServiceForEngine = func() EngineRuleService {
	return GetService()
}

Functions

This section is empty.

Types

type EngineRuleService

type EngineRuleService interface {
	FindAll() ([]types.Rule, error)
	SyncStart(after time.Duration, ruleID, engine string, force bool) (time.Duration, *types.RuleSyncInfo, error)
	SyncEnd(ruleSync types.RuleSyncInfo, syncData types.RuleSyncData) error
}

type LogicCache

type LogicCache interface {
	LogicFromRule(r types.Rule) (src RuleLogic, err error)
}

func NewLogicCache

func NewLogicCache() LogicCache

type RuleLogic

type RuleLogic interface {
	KubernetesRestConfig() (restConfig *rest.Config, poolName string, err error)
}

type RuleService

type RuleService interface {
	EngineRuleService
	Save(rules []*types.Rule, upsert bool) error
	FindMetadata(metadata map[string]string) ([]types.Rule, error)
	FindByRule(rule types.Rule) ([]types.Rule, error)
	FindByID(id string) (types.Rule, error)
	FindBySourceTsuruApp(appName string) ([]types.Rule, error)
	FindBySourceTsuruJob(jobName string) ([]types.Rule, error)
	Delete(id string) error
	DeleteMetadata(metadata map[string]string) error
	FindSyncs(ruleIDFilter []string) ([]types.RuleSyncInfo, error)
}

Jump to

Keyboard shortcuts

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