Documentation ¶
Index ¶
- func AsBatch(msg *metrics_pb.MetricsMessage) (*influxdb.BatchPoints, error)
- func LoadInfluxConfig(src map[interface{}]interface{}) (*influxConfig, error)
- func LoadJSONFileConfig(src map[interface{}]interface{}) (*jsonfileConfig, error)
- func ProbeLatency(ch channel2.Channel, histogram Histogram, interval time.Duration)
- func ProcessLinkEvent(links map[string]interface{}, name string, val interface{}) map[string]interface{}
- type Config
- type EventController
- type Handler
- type HandlerType
- type Histogram
- type IntervalCounter
- type Meter
- type Metric
- type Registry
- type Timer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsBatch ¶
func AsBatch(msg *metrics_pb.MetricsMessage) (*influxdb.BatchPoints, error)
func LoadInfluxConfig ¶
func LoadInfluxConfig(src map[interface{}]interface{}) (*influxConfig, error)
func LoadJSONFileConfig ¶
func LoadJSONFileConfig(src map[interface{}]interface{}) (*jsonfileConfig, error)
func ProbeLatency ¶
send regular latency probes
func ProcessLinkEvent ¶
Types ¶
type EventController ¶
type EventController interface { Handler // AddHandler adds the given arbitrary handler to the event controller AddHandler(handler Handler) // RemoveHandler removes the given handler from the event controller RemoveHandler(handler Handler) // Shutdown stops the event controller Shutdown() }
EventController allows for sending metrics to multiple Handlers
func NewEventController ¶
func NewEventController(cfg *Config) EventController
NewEventController creates a new EventController instance
type Handler ¶
type Handler interface { // AcceptMetrics is called when new metrics become available AcceptMetrics(message *metrics_pb.MetricsMessage) }
Handler represents a sink for metric events
func NewChannelReporter ¶
NewChannelReporter creates a metrics handler which sends metrics messages out on the given channel
func NewInfluxDBMetricsHandler ¶
NewInfluxDBMetricsHandler creates a new HandlerTypeInfluxDB metrics ChannelReporter
func NewJsonFileMetricsHandler ¶
Message handler that write node and link metrics to a file in json format
type HandlerType ¶
type HandlerType string
HandlerType is used define known handler types
const ( // HandlerTypeInfluxDB represents the HandlerTypeInfluxDB reporter HandlerTypeInfluxDB HandlerType = "influxdb" )
const (
HandlerTypeJSONFile HandlerType = "jsonfile"
)
type Histogram ¶
Histogram represents a metric which is measuring the distribution of values for some measurement
type IntervalCounter ¶
IntervalCounter allows tracking counters which are bucketized by some interval
type Metric ¶
type Metric interface {
Dispose()
}
Metric is the base functionality for all metrics types
type Registry ¶
type Registry interface { SourceId() string Meter(name string) Meter Histogram(name string) Histogram Timer(name string) Timer IntervalCounter(name string, intervalSize time.Duration) IntervalCounter Each(visitor func(name string, metric Metric)) EventController() EventController }
Registry allows for configuring and accessing metrics for a fabric application