Documentation ¶
Index ¶
- Variables
- func GetCBCacheKey(serviceName, serviceType string) string
- func SaveToCBCache(raw *model.HystrixConfig)
- func SaveToLBCache(raw *model.LoadBalancing)
- type Panel
- func (p *Panel) GetCircuitBreaker(inv invocation.Invocation, serviceType string) (string, hystrix.CommandConfig)
- func (p *Panel) GetEgressRule(inv invocation.Invocation)
- func (p *Panel) GetFaultInjection(inv invocation.Invocation) model.Fault
- func (p *Panel) GetLoadBalancing(inv invocation.Invocation) control.LoadBalancingConfig
- func (p *Panel) GetRateLimiting(inv invocation.Invocation, serviceType string) control.RateLimitingConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //key is service name LBConfigCache = cache.New(0, 0) //key is [Provider|Consumer]:service_name or [Consumer|Provider] CBConfigCache = cache.New(0, 0) RLConfigCache = cache.New(0, 0) EgressConfigCache = cache.New(0, 0) FIConfigCache = cache.New(0, 0) )
save configs
View Source
var ( DefaultLB = control.LoadBalancingConfig{ Strategy: loadbalancer.StrategyRoundRobin, BackOffKind: backoff.DefaultBackOffKind, } )
Default values
Functions ¶
func GetCBCacheKey ¶
GetCBCacheKey generate cache key
Types ¶
type Panel ¶
type Panel struct { }
Panel pull configs from archaius
func (*Panel) GetCircuitBreaker ¶
func (p *Panel) GetCircuitBreaker(inv invocation.Invocation, serviceType string) (string, hystrix.CommandConfig)
GetCircuitBreaker return command , and circuit breaker settings
func (*Panel) GetEgressRule ¶
func (p *Panel) GetEgressRule(inv invocation.Invocation)
GetEgressRule get egress config
func (*Panel) GetFaultInjection ¶
func (p *Panel) GetFaultInjection(inv invocation.Invocation) model.Fault
GetFaultInjection get Fault injection config
func (*Panel) GetLoadBalancing ¶
func (p *Panel) GetLoadBalancing(inv invocation.Invocation) control.LoadBalancingConfig
GetLoadBalancing get load balancing config
func (*Panel) GetRateLimiting ¶
func (p *Panel) GetRateLimiting(inv invocation.Invocation, serviceType string) control.RateLimitingConfig
GetRateLimiting get rate limiting config
Click to show internal directories.
Click to hide internal directories.