dontschedule

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StrategyType = "dontschedule"
)

StrategyType is set to not schedule.

Variables

This section is empty.

Functions

This section is empty.

Types

type Strategy

Strategy represents the TAS policy strategies.

func (*Strategy) Enforce

func (d *Strategy) Enforce(enforcer *core.MetricEnforcer, cache cache.Reader) (int, error)

Enforce unimplemented for dontschedule.

func (*Strategy) Equals

func (d *Strategy) Equals(other core.Interface) bool

Equals implementation which checks to see if all rules and the policy name are equal for this strategy and another. Used to avoid duplications and to find the correct strategy for deletions in the index.

func (*Strategy) GetPolicyName

func (d *Strategy) GetPolicyName() string

GetPolicyName returns the set policy name for this strategy.

func (*Strategy) SetPolicyName

func (d *Strategy) SetPolicyName(policyName string)

SetPolicyName sets a connected policy name for this strategy.

func (*Strategy) StrategyType

func (d *Strategy) StrategyType() string

StrategyType returns the strategy type constant.

func (*Strategy) Violated

func (d *Strategy) Violated(cache cache.Reader) map[string]interface{}

Violated compares the list of rules against the metric values pulled from the cache. If any single rule is violated the method returns a set of nodes that are currently in violation.

Jump to

Keyboard shortcuts

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