prometheus

package
v1.0.0-dev.156 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigAdd

func ConfigAdd(path string)

func NewPrometheusCollector

func NewPrometheusCollector(namespace string, labels map[string]string) func(string) hystrix_metric.MetricCollector

NewPrometheusCollector returns wrapper function returning an implemented struct from MetricCollector.

func Register

func Register(ctx context.Context) error

Types

type Options

type Options struct {
	Namespace string
	Labels    map[string]string
	Enabled   bool
}

Options represents health options.

func NewOptions

func NewOptions() (*Options, error)

NewOptions returns options from config file or environment vars.

func NewOptionsWithPath

func NewOptionsWithPath(path string) (opts *Options, err error)

NewOptionsWithPath unmarshals a given key path into options and returns it.

type Prometheus

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

Prometheus represents a Prometheus plugin for hystrix.

func NewPrometheus

func NewPrometheus() *Prometheus

NewPrometheus returns a new Prometheus plugin with default options.

func NewPrometheusWithConfigPath

func NewPrometheusWithConfigPath(path string) (*Prometheus, error)

NewPrometheusWithConfigPath returns a new Prometheus plugin with options from config path.

func NewPrometheusWithOptions

func NewPrometheusWithOptions(options *Options) *Prometheus

NewPrometheusWithOptions returns a new Prometheus plugin with options.

func (*Prometheus) Register

func (i *Prometheus) Register(ctx context.Context) error

Register registers this Prometheus plugin for hystrix.

type PrometheusCollector

type PrometheusCollector struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

PrometheusCollector is collecting information that is made from hystrix-go.

func (*PrometheusCollector) Reset

func (c *PrometheusCollector) Reset()

Reset is to reset information (not call method).

func (*PrometheusCollector) Update

Update is to update information from hystrix-go at this time.

Jump to

Keyboard shortcuts

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