You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
kratos/pkg/net/netutil/breaker
libi.chai 5d99a2e79a rm breaker config sleep & ratio 5 years ago
..
README.md rm breaker config sleep & ratio 5 years ago
breaker.go rm breaker config sleep & ratio 5 years ago
breaker_test.go rm breaker config sleep & ratio 5 years ago
example_test.go rm breaker config sleep & ratio 5 years ago
sre_breaker.go fix test fails 6 years ago
sre_breaker_test.go fix test fails 6 years ago

README.md

breaker

项目简介
  1. 提供熔断器功能,供各种client(如rpc、http、msyql)等进行熔断
  2. 提供Go方法供业务在breaker熔断前后进行回调处理
配置说明
  1. NewGroup(name string,c *Config)当c==nil时则采用默认配置
  2. 可通过breaker.Init(c *Config)替换默认配置
  3. 可通过group.Reload(c *Config)进行配置更新
  4. 默认配置如下所示: _conf = &Config{ Window: xtime.Duration(3 * time.Second), Bucket: 10, Request: 100, K:1.5, }
测试
  1. 执行当前目录下所有测试文件,测试所有功能