rules

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Allocation

func Allocation(rule interface{}, taskName string, ruleType string) (*kubeeyev1alpha2.JobRule, error)

func AllocationRule

func AllocationRule(rule interface{}, taskName string, allNode []corev1.Node, ctlOrTem string) ([]kubeeyev1alpha2.JobRule, error)

func RuleArrayDeduplication

func RuleArrayDeduplication[T any](obj interface{}) []T

Types

type ExecuteRule

type ExecuteRule struct {
	KubeClient *kube.KubernetesClient
	Task       *kubeeyev1alpha2.InspectTask
	// contains filtered or unexported fields
}

func NewExecuteRuleOptions

func NewExecuteRuleOptions(clients *kube.KubernetesClient, Task *kubeeyev1alpha2.InspectTask) *ExecuteRule

func (*ExecuteRule) CreateInspectRule

func (e *ExecuteRule) CreateInspectRule(ctx context.Context, ruleGroup []kubeeyev1alpha2.JobRule) ([]kubeeyev1alpha2.JobRule, error)

func (*ExecuteRule) GenerateJob

func (e *ExecuteRule) GenerateJob(ctx context.Context, rulesSpec kubeeyev1alpha2.InspectRuleSpec) (jobs []kubeeyev1alpha2.JobRule)

func (*ExecuteRule) GetRuleTotal

func (e *ExecuteRule) GetRuleTotal() map[string]int

func (*ExecuteRule) MergeRule

func (*ExecuteRule) SetPrometheusEndpoint

func (e *ExecuteRule) SetPrometheusEndpoint(allRule []kubeeyev1alpha2.InspectRule) []kubeeyev1alpha2.InspectRule

func (*ExecuteRule) SetRuleSchedule

func (e *ExecuteRule) SetRuleSchedule(rules []kubeeyev1alpha2.InspectRule) (newRules []kubeeyev1alpha2.InspectRule)

Jump to

Keyboard shortcuts

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