cache

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0, BSD-2-Clause Imports: 4 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
	RuleName 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
	NodeQOS *ensuranceapi.NodeQOS
	// time for detection
	Time time.Time
}

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 NodeQOSCache added in v0.8.0

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

func (*NodeQOSCache) Delete added in v0.8.0

func (s *NodeQOSCache) Delete(name string)

func (*NodeQOSCache) Exist added in v0.8.0

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

func (*NodeQOSCache) Get added in v0.8.0

func (s *NodeQOSCache) Get(name string) (*ensuranceapi.NodeQOS, bool)

func (*NodeQOSCache) GetOrCreate added in v0.8.0

func (s *NodeQOSCache) GetOrCreate(nodeQOS *ensuranceapi.NodeQOS) *ensuranceapi.NodeQOS

func (*NodeQOSCache) Init added in v0.8.0

func (s *NodeQOSCache) Init()

func (*NodeQOSCache) ListKeys added in v0.8.0

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

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

func (*NodeQOSCache) Set added in v0.8.0

func (s *NodeQOSCache) Set(nodeQOS *ensuranceapi.NodeQOS)

Jump to

Keyboard shortcuts

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