control

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() error

Init initialize DefaultPanel

func InstallPlugin

func InstallPlugin(name string, f func(options Options) Panel)

InstallPlugin install implementation

Types

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 Options

type Options struct {
	Address string
}

Options is options

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(inv invocation.Invocation)
}

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

type RateLimitingConfig struct {
	Key     string
	Enabled bool
	Rate    int
}

RateLimitingConfig is a standardized model

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL