carbon

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2015 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForwarderLoader

func ForwarderLoader(ctx context.Context, forwardTo *config.ForwardTo) (protocol.Forwarder, error)

ForwarderLoader loads a carbon forwarder that is buffered

func NativeCarbonLine

func NativeCarbonLine(dp *datapoint.Datapoint) (string, bool)

NativeCarbonLine inspects the datapoints metadata to see if it has information about the carbon source it came from

func NewCarbonDatapoint

func NewCarbonDatapoint(line string, metricDeconstructor metricdeconstructor.MetricDeconstructor) (*datapoint.Datapoint, error)

NewCarbonDatapoint creates a new datapoint from a line in carbon and injects into the datapoint metadata about the original line.

Types

type Forwarder

type Forwarder struct {
	// contains filtered or unexported fields
}

Forwarder is a sink that forwards points to a carbon endpoint

func NewForwarder

func NewForwarder(host string, port uint16, timeout time.Duration, dimensionOrder []string, drainingThreads uint32) (*Forwarder, error)

NewForwarder creates a new unbuffered forwarder for sending points to carbon

func (*Forwarder) AddDatapoints

func (carbonConnection *Forwarder) AddDatapoints(ctx context.Context, points []*datapoint.Datapoint) (err error)

AddDatapoints sends the points to a carbon endpoint. Tries to reuse open connections

func (*Forwarder) Close

func (carbonConnection *Forwarder) Close() error

Close empties out the connections' pool of open connections

type Listener

type Listener struct {
	// contains filtered or unexported fields
}

Listener once setup will listen for carbon protocol points to forward on

func ListenerLoader

func ListenerLoader(ctx context.Context, sink dpsink.Sink, listenFrom *config.ListenFrom) (*Listener, error)

ListenerLoader loads a listener for the carbon/graphite protocol from config

func NewListener

func NewListener(ctx context.Context, sink dpsink.Sink, conf listenerConfig, listenAddr string,
	metricDeconstructor string, metricDeconstructorOptions string) (*Listener, error)

NewListener creates a new listener for carbon datapoints

func (*Listener) Close

func (listener *Listener) Close() error

Close the exposed carbon port

func (*Listener) Stats

func (listener *Listener) Stats() []*datapoint.Datapoint

Stats reports information about the total points seen by carbon

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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