go微服务
猫撵耗子
这个作者很懒,什么都没留下…
展开
-
Hystrix熔断器的使用_Golang
Hystrix熔断器的使用_Golang下载hystrix-gogo get github.com/afex/hystrix-go在go-mirco中使用 // 超时代码 // import github.com/afex/hystrix-go/hystrix // 1.配置config configA := hystrix.CommandConfig{ Timeout: 1000, } // 2.配置command hystrix.Conf原创 2020-05-16 18:09:26 · 1669 阅读 · 0 评论 -
Go语言封装RabbitMq操作
Go语言封装RabbitMq操作发送端封装1、建立发送端结构体type SendRabbitMQ struct { conn *amqp.Connection ch *amqp.Channel q amqp.Queue}2、通过rabbitmq的地址和通道名称建立SendRabbitMQ对象地址:amqp://guest:guest@localhost:5672/通道名称: ...原创 2020-05-03 09:55:32 · 1002 阅读 · 0 评论