Documentation ¶
Index ¶
- func GetCircuitBreaker(name string) *gobreaker.CircuitBreaker
- func GetSelfServiceName() string
- func InitChildService(cfg []map[string]interface{})
- func InitCircuitBreaker(c []map[string]interface{})
- func InitSelfService(selfName string, closeBreaker bool)
- func InjectSidecarHeader(req *http.Request, ServiceName string)
- func InjectTrace(name string, tracer opentracing.Tracer, span opentracing.Span, ...)
- type Client
- type HttpServer
- type InjectRequest
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCircuitBreaker ¶
func GetCircuitBreaker(name string) *gobreaker.CircuitBreaker
GetCircuitBreaker returns a CircuitBreaker by name
func GetSelfServiceName ¶
func GetSelfServiceName() string
func InitChildService ¶
func InitChildService(cfg []map[string]interface{})
func InitCircuitBreaker ¶
func InitCircuitBreaker(c []map[string]interface{})
InitCircuitBreaker 初始化熔断配置
{ "default":{ "maxRequests":1, "interval":1, "timeout":10, "failureRatio":1, "consecutiveFailures":100 } }
func InitSelfService ¶
InitSelfService selfName 本身服务名称 closeBreaker 子服务熔断开启 默认开启 ,true 关闭
func InjectSidecarHeader ¶
func InjectTrace ¶
Types ¶
type HttpServer ¶
Click to show internal directories.
Click to hide internal directories.