receiver

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GraphiteLineReceiverMaxLineSize = 32 * 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Listen   string
	Protocol string
	Workers  int
	Strict   bool
}

type GraphiteLineReceiver

type GraphiteLineReceiver struct {
	Config

	Metrics Metrics
	// contains filtered or unexported fields
}

func NewGraphiteLineReceiver

func NewGraphiteLineReceiver(config Config, router routers.Router, exitChan <-chan struct{}, maxBatchSize int, sendInterval time.Duration) (*GraphiteLineReceiver, error)

func (*GraphiteLineReceiver) Parse

func (l *GraphiteLineReceiver) Parse(line []byte) (*carbon.Metric, error)

func (*GraphiteLineReceiver) Start

func (l *GraphiteLineReceiver) Start()

type Metrics

type Metrics struct {
	ProcessedMetrics uint64
	ProcessingTimeNS uint64
}

type Receiver

type Receiver interface {
	Start()
	Parse(line []byte) (*carbon.Metric, error)
}

Jump to

Keyboard shortcuts

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