Documentation ¶
Index ¶
Constants ¶
const ( TCP = "tcp" UDP = "udp" )
Constants for udp and tcp config
Variables ¶
This section is empty.
Functions ¶
func NativeCarbonLine ¶
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 { filtering.FilteredForwarder // contains filtered or unexported fields }
Forwarder is a sink that forwards points to a carbon endpoint
func NewForwarder ¶
func NewForwarder(host string, passedConf *ForwarderConfig) (*Forwarder, error)
NewForwarder creates a new unbuffered forwarder for sending points to carbon
func (*Forwarder) AddDatapoints ¶
AddDatapoints sends the points to a carbon endpoint. Tries to reuse open connections
func (*Forwarder) Datapoints ¶ added in v0.9.0
Datapoints returns connection pool datapoints
type ForwarderConfig ¶ added in v0.9.0
type ForwarderConfig struct { Filters *filtering.FilterObj Port *uint16 Timeout *time.Duration DimensionOrder []string IdleConnectionPoolSize *int64 Timer timekeeper.TimeKeeper }
ForwarderConfig controls optional parameters for a carbon forwarder
type Listener ¶
type Listener struct { protocol.CloseableHealthCheck // contains filtered or unexported fields }
Listener once setup will listen for carbon protocol points to forward on
func NewListener ¶
func NewListener(sendTo dpsink.Sink, passedConf *ListenerConfig) (*Listener, error)
NewListener creates a new listener for carbon datapoints
func (*Listener) Datapoints ¶ added in v0.9.0
Datapoints reports information about the total points seen by carbon
type ListenerConfig ¶ added in v0.9.0
type ListenerConfig struct { ServerAcceptDeadline *time.Duration ConnectionTimeout *time.Duration ListenAddr *string MetricDeconstructor metricdeconstructor.MetricDeconstructor Logger log.Logger Protocol *string }
ListenerConfig controls optional parameters for carbon listeners