zconcurrency

package
v0.0.0-...-325af03 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Entry

func Entry(cluster, table string) bool

Entry check if allow request

func StatBreaker

func StatBreaker(cluster, table string, err error)

StatBreaker state errors for breaker

Types

type Breaker

type Breaker struct {
	Rejected      int32
	RejectedStart int64
	Count         int32
}

type BreakerManager

type BreakerManager struct {
	Breakers map[string]*Breaker
	// contains filtered or unexported fields
}

TOOD 简单计数法实现熔断操作,后续改为滑动窗口或三方组件的方式

Jump to

Keyboard shortcuts

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