composite

package
v1.6.0-beta Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompositeCircuitBreaker

type CompositeCircuitBreaker struct {
	*plugin.PluginBase
	// contains filtered or unexported fields
}

func (*CompositeCircuitBreaker) CheckResource

CheckResource get the resource circuitbreaker status

func (*CompositeCircuitBreaker) Destroy

func (c *CompositeCircuitBreaker) Destroy() error

Destroy 销毁插件,可用于释放资源

func (*CompositeCircuitBreaker) Init

Init 初始化插件

func (*CompositeCircuitBreaker) Name

func (c *CompositeCircuitBreaker) Name() string

Name 插件名,一个类型下插件名唯一

func (*CompositeCircuitBreaker) OnEvent

func (c *CompositeCircuitBreaker) OnEvent(event *common.PluginEvent) error

func (*CompositeCircuitBreaker) Report

Report report resource invoke result stat

func (*CompositeCircuitBreaker) Start

func (c *CompositeCircuitBreaker) Start() error

Start 启动插件,对于需要依赖外部资源,以及启动协程的操作,在Start方法里面做

func (*CompositeCircuitBreaker) Type

Type 插件类型

type CountersBucket

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

type HealthCheckersBucket

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

type ProtocolInstance

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

type ResourceCounters

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

ResourceCounters .

func (*ResourceCounters) CloseToOpen

func (rc *ResourceCounters) CloseToOpen(breaker string)

func (*ResourceCounters) CurrentActiveRule

func (rc *ResourceCounters) CurrentActiveRule() *fault_tolerance.CircuitBreakerRule

func (*ResourceCounters) CurrentCircuitBreakerStatus

func (rc *ResourceCounters) CurrentCircuitBreakerStatus() model.CircuitBreakerStatus

func (*ResourceCounters) HalfOpenToClose

func (rc *ResourceCounters) HalfOpenToClose()

func (*ResourceCounters) HalfOpenToOpen

func (rc *ResourceCounters) HalfOpenToOpen()

func (*ResourceCounters) OpenToHalfOpen

func (rc *ResourceCounters) OpenToHalfOpen()

func (*ResourceCounters) Report

func (rc *ResourceCounters) Report(stat *model.ResourceStat)

type ResourceHealthChecker

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

func NewResourceHealthChecker

func NewResourceHealthChecker(res model.Resource, faultDetector *fault_tolerance.FaultDetector,
	breaker *CompositeCircuitBreaker) *ResourceHealthChecker

type RuleContainer

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

RuleContainer

type TaskExecutor

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

func (*TaskExecutor) AffinityDelayExecute

func (e *TaskExecutor) AffinityDelayExecute(key string, delay time.Duration, f func())

func (*TaskExecutor) AffinityExecute

func (e *TaskExecutor) AffinityExecute(key string, f func())

func (*TaskExecutor) DelayExecute

func (e *TaskExecutor) DelayExecute(delay time.Duration, f func())

func (*TaskExecutor) Execute

func (e *TaskExecutor) Execute(f func())

func (*TaskExecutor) IntervalExecute

func (e *TaskExecutor) IntervalExecute(interval time.Duration, f func())

func (*TaskExecutor) Stop

func (e *TaskExecutor) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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