degradation

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enable     bool `json:"enable"`
	Percentage int  `json:"percentage"`
}

DegradationConfig is policy config of degradator. DON'T FORGET to update DeepCopy() and Equals() if you add new fields.

func GetDefaultDegradationConfig

func GetDefaultDegradationConfig() *Config

GetDefaultDegradationConfig return defaultConfig of degradation.

func (*Config) DeepCopy

func (c *Config) DeepCopy() *Config

DeepCopy returns a full copy of DegradationConfig.

func (*Config) Equals

func (c *Config) Equals(other *Config) bool

type Container

type Container struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewDegradationContainer

func NewDegradationContainer() *Container

func (*Container) GetACLRule

func (s *Container) GetACLRule() acl.RejectFunc

func (*Container) NotifyPolicyChange

func (s *Container) NotifyPolicyChange(cfg *Config)

Jump to

Keyboard shortcuts

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