indexer

package
v0.1.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2016 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Source        bus.AckSource
	SampleIndexer storage.SampleIndexer
}

Config represents the configuration of an Indexer. It takes an implmenter Acksource of the target message bus and an implmenter of SampleIndexer of the target indexing system.

type Indexer

type Indexer struct {
	prometheus.Collector
	Source        bus.AckSource
	SampleIndexer storage.SampleIndexer
	// contains filtered or unexported fields
}

Indexer represents an object that consumes metrics from a message bus and writes them to indexing system.

func NewIndexer

func NewIndexer(config *Config) *Indexer

NewIndexer creates a new instance of an Indexer.

func (*Indexer) Collect

func (i *Indexer) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector. Sends metrics collected by the instance's indexDurations, SampleIndexer, and errorsTotal to the parameter ch.

func (*Indexer) Describe

func (i *Indexer) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector. Sends decriptors of the instance's indexDurations, SampleIndexer, and errorsTotal to the parameter ch.

func (*Indexer) Run

func (i *Indexer) Run() error

Run starts the indexer process of consuming from the bus and indexing to the target indexing system.

Jump to

Keyboard shortcuts

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