cache

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateDetectionKey

func GenerateDetectionKey(c ActionContext) string

Types

type ActionContext added in v0.3.0

type ActionContext struct {
	// the Objective Ensurance name
	ObjectiveEnsuranceName string
	// strategy for the action
	Strategy ensuranceapi.AvoidanceActionStrategy
	// if the policy triggered action
	Triggered bool
	// if the policy triggered restored action
	Restored bool
	// action name
	ActionName string
	// node qos ensurance policy
	Nep *ensuranceapi.NodeQOSEnsurancePolicy
	// time for detection
	Time time.Time
	// the influenced pod list
	// node detection the pod list is empty
	BeInfluencedPods []types.NamespacedName
}

type ActionContextCache added in v0.3.0

type ActionContextCache struct {
	// contains filtered or unexported fields
}

func (*ActionContextCache) Exist added in v0.3.0

func (s *ActionContextCache) Exist(key string) bool

func (*ActionContextCache) Get added in v0.3.0

func (*ActionContextCache) GetOrCreate added in v0.3.0

func (*ActionContextCache) ListDetections added in v0.3.0

func (s *ActionContextCache) ListDetections() []ActionContext

func (*ActionContextCache) Set added in v0.3.0

type DetectionStatus

type DetectionStatus struct {
	IsTriggered bool
	LastTime    time.Time
}

type NodeQOSEnsurancePolicyCache

type NodeQOSEnsurancePolicyCache struct {
	// contains filtered or unexported fields
}

func (*NodeQOSEnsurancePolicyCache) Delete

func (s *NodeQOSEnsurancePolicyCache) Delete(name string)

func (*NodeQOSEnsurancePolicyCache) Exist

func (s *NodeQOSEnsurancePolicyCache) Exist(name string) bool

func (*NodeQOSEnsurancePolicyCache) Get

func (*NodeQOSEnsurancePolicyCache) GetOrCreate

func (*NodeQOSEnsurancePolicyCache) Init

func (s *NodeQOSEnsurancePolicyCache) Init()

func (*NodeQOSEnsurancePolicyCache) ListKeys

func (s *NodeQOSEnsurancePolicyCache) ListKeys() []string

ListKeys implements the interface required by DeltaFIFO to list the keys we already know about.

func (*NodeQOSEnsurancePolicyCache) Set

Jump to

Keyboard shortcuts

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