models

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_POINT_BUFFER_LIMIT = 10000

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	Drop []string
	Pass []string

	TagDrop []TagFilter
	TagPass []TagFilter

	IsActive bool
}

Filter containing drop/pass and tagdrop/tagpass rules

func (Filter) ShouldPass

func (f Filter) ShouldPass(key string) bool

ShouldPass returns true if the metric should pass, false if should drop based on the drop/pass filter parameters

func (Filter) ShouldPointPass

func (f Filter) ShouldPointPass(point *client.Point) bool

func (Filter) ShouldTagsPass

func (f Filter) ShouldTagsPass(tags map[string]string) bool

ShouldTagsPass returns true if the metric should pass, false if should drop based on the tagdrop/tagpass filter parameters

type InputConfig

type InputConfig struct {
	Name              string
	NameOverride      string
	MeasurementPrefix string
	MeasurementSuffix string
	Tags              map[string]string
	Filter            Filter
	Interval          time.Duration
}

InputConfig containing a name, interval, and filter

type OutputConfig

type OutputConfig struct {
	Name   string
	Filter Filter
}

OutputConfig containing name and filter

type RunningInput

type RunningInput struct {
	Name   string
	Input  inputs.Input
	Config *InputConfig
}

type RunningOutput

type RunningOutput struct {
	Name             string
	Output           outputs.Output
	Config           *OutputConfig
	Quiet            bool
	PointBufferLimit int
	// contains filtered or unexported fields
}

func NewRunningOutput

func NewRunningOutput(
	name string,
	output outputs.Output,
	conf *OutputConfig,
) *RunningOutput

func (*RunningOutput) AddPoint

func (ro *RunningOutput) AddPoint(point *client.Point)

func (*RunningOutput) Write

func (ro *RunningOutput) Write() error

type TagFilter

type TagFilter struct {
	Name   string
	Filter []string
}

TagFilter is the name of a tag, and the values on which to filter

Jump to

Keyboard shortcuts

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