Documentation ¶
Index ¶
Constants ¶
const ( //ScopeAPI is config const ScopeAPI = "api" //ScopeInstance is config const ScopeInstance = "instance" //ScopeInstanceAPI is config const ScopeInstanceAPI = "instance-api" )
Variables ¶
This section is empty.
Functions ¶
func InstallPlugin ¶
InstallPlugin install implementation
func NewCircuitName ¶ added in v1.0.1
func NewCircuitName(serviceType, scope string, inv invocation.Invocation) string
NewCircuitName create circuit command string scope means has two choices, service and api if you set it to api, a api level command string will be created. like "Consumer.mall.rest./test" set to service, a service level command will be created, like "Consumer.mall"
Types ¶
type EgressConfig ¶ added in v1.1.1
type EgressConfig struct { Hosts []string Ports []*EgressPort }
EgressConfig is a standardized model
type EgressPort ¶ added in v1.1.1
EgressPort protocol and the corresponding port
type LoadBalancingConfig ¶
type LoadBalancingConfig struct { Strategy string Filters []string RetryEnabled bool RetryOnSame int RetryOnNext int BackOffKind string BackOffMin int BackOffMax int SessionTimeoutInSeconds int SuccessiveFailedTimes int }
LoadBalancingConfig is a standardized model
type Panel ¶
type Panel interface { GetCircuitBreaker(inv invocation.Invocation, serviceType string) (string, hystrix.CommandConfig) GetLoadBalancing(inv invocation.Invocation) LoadBalancingConfig GetRateLimiting(inv invocation.Invocation, serviceType string) RateLimitingConfig GetFaultInjection(inv invocation.Invocation) model.Fault GetEgressRule() []EgressConfig }
Panel is a abstraction of pulling configurations from various of systems, and transfer different configuration into standardized model you can use different panel implementation to pull different of configs from Istio or Archaius TODO able to set configs
var DefaultPanel Panel
DefaultPanel get fetch config
type RateLimitingConfig ¶
RateLimitingConfig is a standardized model