eventlistener

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: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConsumerIsolationKey is a variable of type string
	ConsumerIsolationKey      = "cse.isolation"
	ConsumerCircuitbreakerKey = "cse.circuitBreaker"
	ConsumerFallbackKey       = "cse.fallback"
	ConsumerFallbackPolicyKey = "cse.fallbackpolicy"
)

constants for consumer isolation, circuit breaker, fallback keys

View Source
const (
	//DarkLaunchKey & DarkLaunchPrefix is a variable of type string
	DarkLaunchKey    = "^cse\\.darklaunch\\.policy\\."
	DarkLaunchPrefix = "cse.darklaunch.policy."
)

constants for dark launch key and prefix

View Source
const (
	//LoadBalanceKey is variable of type string that matches load balancing events
	LoadBalanceKey = "^cse\\.loadbalance\\."
)

constants for loadbalancer strategy name, and timeout

View Source
const (
	//QPSLimitKey is a variable of type string
	QPSLimitKey = "cse.flowcontrol"
)

Variables

This section is empty.

Functions

func FlushCircuitByKey

func FlushCircuitByKey(key string)

FlushCircuitByKey is a function used to flush for a particular key

func GetCircuitName

func GetCircuitName(sourceName, serviceName string) string

GetCircuitName is a function used to get circuit names

func GetNames

func GetNames(key string) (string, string)

GetNames is function

func Init

func Init()

Init is a function

func RegisterKeys

func RegisterKeys(eventListener core.EventListener, keys ...string)

RegisterKeys registers a config key to the archaius

Types

type CircuitBreakerEventListener

type CircuitBreakerEventListener struct {
	Key string
}

CircuitBreakerEventListener is a struct with one string variable

func (*CircuitBreakerEventListener) Event

func (e *CircuitBreakerEventListener) Event(event *core.Event)

Event is a method which triggers flush circuit

type DarkLaunchEventListener

type DarkLaunchEventListener struct{}

DarkLaunchEventListener is a struct

func (*DarkLaunchEventListener) Event

func (d *DarkLaunchEventListener) Event(event *core.Event)

Event is method used for dark launch event listening

type LoadbalanceEventListener

type LoadbalanceEventListener struct {
	Key string
}

LoadbalanceEventListener is a struct

func (*LoadbalanceEventListener) Event

func (e *LoadbalanceEventListener) Event(event *core.Event)

Event is a method used to handle a load balancing event

type QPSEventListener

type QPSEventListener struct {
	//Key []string
	Key string
}

QPSEventListener is a struct used for Event listener

func (*QPSEventListener) Event

func (e *QPSEventListener) Event(event *core.Event)

Event is a method for QPS event listening

Jump to

Keyboard shortcuts

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