metrics

package
v0.17.48 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMetricsEventHandler

func AddMetricsEventHandler(handler MessageHandler)

func InitMetricHandlers

func InitMetricHandlers(cfg *metrics.Config)

func RemoveMetricsEventHandler

func RemoveMetricsEventHandler(handler MessageHandler)

Types

type MessageHandler

type MessageHandler interface {
	// AcceptMetrics is called when new metrics become available
	AcceptMetrics(message *metrics_pb.MetricsMessage)
}

MessageHandler represents a sink for metric events

func NewChannelReporter

func NewChannelReporter(ch channel.Channel) MessageHandler

NewChannelReporter creates a metrics handler which sends metrics messages out on the given channel

func NewDispatchWrapper

func NewDispatchWrapper(delegate func(event event.Event)) MessageHandler

Jump to

Keyboard shortcuts

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