plugins

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package plugins allows users to operate on statistics recorded for each circuit operation. Plugins should be careful to be lightweight as they will be called frequently.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type M3Collector

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

M3Collector fulfills the metricCollector interface allowing users to ship circuit stats to a m3 backend. To use users must call InitializeM3Collector before circuits are started. Then register NewM3Collector with metricCollector.Registry.Register(NewM3Collector).

func (*M3Collector) Reset

func (g *M3Collector) Reset()

Reset is a noop operation in this collector.

func (*M3Collector) Update

Update is a callback by hystrix lib to relay the metrics to m3

type M3CollectorClient

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

M3CollectorClient provides configuration that the m3 client will need.

func InitializeM3Collector

func InitializeM3Collector(scope tally.Scope) *M3CollectorClient

InitializeM3Collector creates the connection to the m3

func (*M3CollectorClient) NewM3Collector

func (m *M3CollectorClient) NewM3Collector(name string) metricCollector.MetricCollector

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

Jump to

Keyboard shortcuts

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