摘要:
使用go-micro的装饰器整合熔断器 package Wrappers import ( "context" "github.com/afex/hystrix-go/hystrix" "github.com/micro/go-micro/client" "go-micro/Services" "strconv" ) type ProdsWrapper... 阅读全文
摘要:
使用熔断器降级,商品查询出错,降级使用系统推荐的商品 package Weblib import ( "github.com/afex/hystrix-go/hystrix" "github.com/gin-gonic/gin" "go-micro/Services" "strconv" ) func newProd(id int32, pname strin... 阅读全文
摘要:
现在rpc服务端设置3秒延迟模拟 package ServiceImpl import ( "context" "go-micro-grpc/Services" "strconv" "time" ) type ProdService struct { } func (*ProdService) GetProdsList(ctx context.Con... 阅读全文