cb

package
v0.0.0-...-b40c5a5 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2018 License: MIT Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCBMiddleware

func NewCBMiddleware(cfg Config, def *api.Definition) func(http.Handler) http.Handler

NewCBMiddleware creates a new cb middleware

func NewCollectorRegistry

func NewCollectorRegistry(client client.Client) func(string) metricCollector.MetricCollector

NewCollectorRegistry returns a function to be registerd with metricCollector.Registry.Register(NewCollectorRegistry).

Types

type Config

type Config struct {
	hystrix.CommandConfig
	Predicate string `json:"predicate"`
}

Config represents the Body Limit configuration

type StatsCollector

type StatsCollector struct {
	// contains filtered or unexported fields
}

StatsCollector fulfills the metricCollector interface allowing users to ship circuit stats to a metric backend. To use users must call InitializeStatsCollector before circuits are started.

func NewStatsCollector

func NewStatsCollector(name string, client client.Client) (*StatsCollector, error)

NewStatsCollector creates a collector for a specific circuit. The prefix given to this circuit will be {config.Prefix}.{circuit_name}.{metric}. Circuits with "/" in their names will have them replaced with ".".

func (*StatsCollector) Reset

func (g *StatsCollector) Reset()

Reset is a noop operation in this collector.

func (*StatsCollector) Update

func (g *StatsCollector) Update(r metricCollector.MetricResult)

Update metrics

Jump to

Keyboard shortcuts

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