fullerite: github.com/Yelp/fullerite/src/fullerite/handler Index | Files

package handler

import "github.com/Yelp/fullerite/src/fullerite/handler"

Package handler is a generated protocol buffer package.

It is generated from these files:

src/fullerite/handler/signalfx.proto

It has these top-level messages:

Datum
Dimension
DataPoint
DataPointUploadMessage
PointValue

Index

Package Files

datadog.go graphite.go handler.go kairos.go log.go scribe.go signalfx.go signalfx.pb.go test.go wavefront.go

Constants

const (
    DefaultBufferSize                = 100
    DefaultInterval                  = 10
    DefaultTimeoutSec                = 2
    DefaultMaxIdleConnectionsPerHost = 2
    DefaultKeepAliveInterval         = 30
)

Some sane values to default things to

Variables

var MetricType_name = map[int32]string{
    0:  "GAUGE",
    1:  "COUNTER",
    2:  "ENUM",
    3:  "CUMULATIVE_COUNTER",
}
var MetricType_value = map[string]int32{
    "GAUGE":              0,
    "COUNTER":            1,
    "ENUM":               2,
    "CUMULATIVE_COUNTER": 3,
}

func RegisterHandler Uses

func RegisterHandler(name string, f func(chan metric.Metric, int, int, time.Duration, *l.Entry) Handler)

RegisterHandler takes handler name and constructor function and returns handler

type BaseHandler Uses

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

BaseHandler is class to handle the boiler plate parts of the handlers

func (*BaseHandler) Channel Uses

func (base *BaseHandler) Channel() chan metric.Metric

Channel : the channel to handler listens for metrics on

func (*BaseHandler) CollectorBlackList Uses

func (base *BaseHandler) CollectorBlackList() map[string]bool

CollectorBlackList : return handler specific black listed collectors

func (*BaseHandler) CollectorEndpoints Uses

func (base *BaseHandler) CollectorEndpoints() map[string]CollectorEnd

CollectorEndpoints : the channels to handler listens for metrics on

func (*BaseHandler) CollectorWhiteList Uses

func (base *BaseHandler) CollectorWhiteList() map[string]bool

CollectorWhiteList : return handler specific black listed collectors

func (*BaseHandler) DefaultDimensions Uses

func (base *BaseHandler) DefaultDimensions() map[string]string

DefaultDimensions : dimensions that should be included in any metric

func (*BaseHandler) GetEmissionTimesLen Uses

func (base *BaseHandler) GetEmissionTimesLen() int

GetEmissionTimesLen returns base.emissionTimes.Len thread-safe

func (*BaseHandler) InitListeners Uses

func (base *BaseHandler) InitListeners(globalConfig config.Config)

InitListeners - initiate listener channels for collectors

func (*BaseHandler) InternalMetrics Uses

func (base *BaseHandler) InternalMetrics() metric.InternalMetrics

InternalMetrics : Returns the internal metrics that are being collected by this handler

func (*BaseHandler) Interval Uses

func (base *BaseHandler) Interval() int

Interval : the maximum interval that the handler should buffer stats for

func (*BaseHandler) IsCollectorBlackListed Uses

func (base *BaseHandler) IsCollectorBlackListed(collectorName string) (bool, bool)

IsCollectorBlackListed : return true if collectorName is blacklisted in the handler

func (*BaseHandler) IsCollectorWhiteListed Uses

func (base *BaseHandler) IsCollectorWhiteListed(collectorName string) (bool, bool)

IsCollectorWhiteListed : return true if collectorName is blacklisted in the handler

func (*BaseHandler) KeepAliveInterval Uses

func (base *BaseHandler) KeepAliveInterval() int

KeepAliveInterval - return keep alive interval

func (*BaseHandler) MaxBufferSize Uses

func (base *BaseHandler) MaxBufferSize() int

MaxBufferSize : the maximum number of metrics that should be buffered before sending

func (*BaseHandler) MaxIdleConnectionsPerHost Uses

func (base *BaseHandler) MaxIdleConnectionsPerHost() int

MaxIdleConnectionsPerHost : return max idle connections per host

func (*BaseHandler) Name Uses

func (base *BaseHandler) Name() string

Name : the name of the handler

func (*BaseHandler) OverrideBaseEmissionMetricsReporter Uses

func (base *BaseHandler) OverrideBaseEmissionMetricsReporter()

OverrideBaseEmissionMetricsReporter : Do not report emissionTiming metrics in the base handler

func (*BaseHandler) Prefix Uses

func (base *BaseHandler) Prefix() string

Prefix : the prefix (with punctuation) to use on each emitted metric

func (*BaseHandler) SetCollectorBlackList Uses

func (base *BaseHandler) SetCollectorBlackList(blackList []string)

SetCollectorBlackList : Add collectors mentioned in the handler config to blacklist

func (*BaseHandler) SetCollectorEndpoints Uses

func (base *BaseHandler) SetCollectorEndpoints(c map[string]CollectorEnd)

SetCollectorEndpoints : the channels to handler listens for metrics on

func (*BaseHandler) SetCollectorWhiteList Uses

func (base *BaseHandler) SetCollectorWhiteList(whiteList []string)

SetCollectorWhiteList : Add collectors mentioned in the handler config to the whitelist

func (*BaseHandler) SetDefaultDimensions Uses

func (base *BaseHandler) SetDefaultDimensions(defaults map[string]string)

SetDefaultDimensions : set the defautl dimensions

func (*BaseHandler) SetInterval Uses

func (base *BaseHandler) SetInterval(val int)

SetInterval : set the interval

func (*BaseHandler) SetKeepAliveInterval Uses

func (base *BaseHandler) SetKeepAliveInterval(value int)

SetKeepAliveInterval : Set keep alive interval

func (*BaseHandler) SetMaxBufferSize Uses

func (base *BaseHandler) SetMaxBufferSize(size int)

SetMaxBufferSize : set the buffer size

func (*BaseHandler) SetMaxIdleConnectionsPerHost Uses

func (base *BaseHandler) SetMaxIdleConnectionsPerHost(value int)

SetMaxIdleConnectionsPerHost : Set maximum idle connections per host

func (*BaseHandler) SetPrefix Uses

func (base *BaseHandler) SetPrefix(prefix string)

SetPrefix : any prefix that should be applied to the metrics name as they're sent it is appended without any punctuation, include your own

func (*BaseHandler) String Uses

func (base *BaseHandler) String() string

String returns the handler name in a printable format.

func (*BaseHandler) UseCustomEmissionMetricsReporter Uses

func (base *BaseHandler) UseCustomEmissionMetricsReporter() bool

UseCustomEmissionMetricsReporter : Returns true if base emission metrics reporter is disabled

type CollectorEnd Uses

type CollectorEnd struct {
    Channel    chan metric.Metric
    BufferSize int
}

CollectorEnd defines a endpoint from which handler reads metrics from collector

type DataPoint Uses

type DataPoint struct {
    Source           *string      `protobuf:"bytes,1,opt,name=source" json:"source,omitempty"`
    Metric           *string      `protobuf:"bytes,2,opt,name=metric" json:"metric,omitempty"`
    Timestamp        *int64       `protobuf:"varint,3,opt,name=timestamp" json:"timestamp,omitempty"`
    Value            *Datum       `protobuf:"bytes,4,opt,name=value" json:"value,omitempty"`
    MetricType       *MetricType  `protobuf:"varint,5,opt,name=metricType,enum=handler.MetricType" json:"metricType,omitempty"`
    Dimensions       []*Dimension `protobuf:"bytes,6,rep,name=dimensions" json:"dimensions,omitempty"`
    XXX_unrecognized []byte       `json:"-"`
}

func (*DataPoint) GetDimensions Uses

func (m *DataPoint) GetDimensions() []*Dimension

func (*DataPoint) GetMetric Uses

func (m *DataPoint) GetMetric() string

func (*DataPoint) GetMetricType Uses

func (m *DataPoint) GetMetricType() MetricType

func (*DataPoint) GetSource Uses

func (m *DataPoint) GetSource() string

func (*DataPoint) GetTimestamp Uses

func (m *DataPoint) GetTimestamp() int64

func (*DataPoint) GetValue Uses

func (m *DataPoint) GetValue() *Datum

func (*DataPoint) ProtoMessage Uses

func (*DataPoint) ProtoMessage()

func (*DataPoint) Reset Uses

func (m *DataPoint) Reset()

func (*DataPoint) String Uses

func (m *DataPoint) String() string

type DataPointUploadMessage Uses

type DataPointUploadMessage struct {
    Datapoints       []*DataPoint `protobuf:"bytes,1,rep,name=datapoints" json:"datapoints,omitempty"`
    XXX_unrecognized []byte       `json:"-"`
}

func (*DataPointUploadMessage) GetDatapoints Uses

func (m *DataPointUploadMessage) GetDatapoints() []*DataPoint

func (*DataPointUploadMessage) ProtoMessage Uses

func (*DataPointUploadMessage) ProtoMessage()

func (*DataPointUploadMessage) Reset Uses

func (m *DataPointUploadMessage) Reset()

func (*DataPointUploadMessage) String Uses

func (m *DataPointUploadMessage) String() string

type Datadog Uses

type Datadog struct {
    BaseHandler
    // contains filtered or unexported fields
}

Datadog handler

func (*Datadog) Configure Uses

func (d *Datadog) Configure(configMap map[string]interface{})

Configure the Datadog handler

func (Datadog) Endpoint Uses

func (d Datadog) Endpoint() string

Endpoint returns the Datadog API endpoint

func (*Datadog) Run Uses

func (d *Datadog) Run()

Run runs the handler main loop

type Datum Uses

type Datum struct {
    StrValue         *string  `protobuf:"bytes,1,opt,name=strValue" json:"strValue,omitempty"`
    DoubleValue      *float64 `protobuf:"fixed64,2,opt,name=doubleValue" json:"doubleValue,omitempty"`
    IntValue         *int64   `protobuf:"varint,3,opt,name=intValue" json:"intValue,omitempty"`
    XXX_unrecognized []byte   `json:"-"`
}

func (*Datum) GetDoubleValue Uses

func (m *Datum) GetDoubleValue() float64

func (*Datum) GetIntValue Uses

func (m *Datum) GetIntValue() int64

func (*Datum) GetStrValue Uses

func (m *Datum) GetStrValue() string

func (*Datum) ProtoMessage Uses

func (*Datum) ProtoMessage()

func (*Datum) Reset Uses

func (m *Datum) Reset()

func (*Datum) String Uses

func (m *Datum) String() string

type Dimension Uses

type Dimension struct {
    Key              *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
    Value            *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
    XXX_unrecognized []byte  `json:"-"`
}

func (*Dimension) GetKey Uses

func (m *Dimension) GetKey() string

func (*Dimension) GetValue Uses

func (m *Dimension) GetValue() string

func (*Dimension) ProtoMessage Uses

func (*Dimension) ProtoMessage()

func (*Dimension) Reset Uses

func (m *Dimension) Reset()

func (*Dimension) String Uses

func (m *Dimension) String() string

type Graphite Uses

type Graphite struct {
    BaseHandler
    // contains filtered or unexported fields
}

Graphite type

func (*Graphite) Configure Uses

func (g *Graphite) Configure(configMap map[string]interface{})

Configure accepts the different configuration options for the Graphite handler

func (Graphite) Port Uses

func (g Graphite) Port() string

Port returns the Graphite server's port number

func (*Graphite) Run Uses

func (g *Graphite) Run()

Run runs the handler main loop

func (Graphite) Server Uses

func (g Graphite) Server() string

Server returns the Graphite server's name or IP

type Handler Uses

type Handler interface {
    Run()
    Configure(map[string]interface{})
    InitListeners(config.Config)

    // InternalMetrics is to publish a set of values
    // that are relevant to the handler itself.
    InternalMetrics() metric.InternalMetrics

    // taken care of by the base
    Name() string
    String() string
    Channel() chan metric.Metric

    CollectorEndpoints() map[string]CollectorEnd
    SetCollectorEndpoints(map[string]CollectorEnd)

    Interval() int
    SetInterval(int)

    MaxBufferSize() int
    SetMaxBufferSize(int)

    Prefix() string
    SetPrefix(string)

    DefaultDimensions() map[string]string
    SetDefaultDimensions(map[string]string)

    MaxIdleConnectionsPerHost() int
    SetMaxIdleConnectionsPerHost(int)

    KeepAliveInterval() int
    SetKeepAliveInterval(int)

    // Return true if collector
    // is blacklisted in the handler
    SetCollectorBlackList([]string)
    CollectorBlackList() map[string]bool
    IsCollectorBlackListed(string) (bool, bool)

    // Return true if collector
    // is whitelisted in the handler
    SetCollectorWhiteList([]string)
    CollectorWhiteList() map[string]bool
    IsCollectorWhiteListed(string) (bool, bool)

    // Return true if handler implementation
    // takes care of reporting emission metrics
    OverrideBaseEmissionMetricsReporter()
    UseCustomEmissionMetricsReporter() bool
}

Handler defines the interface of a generic handler.

func New Uses

func New(name string) Handler

New creates a new Handler based on the requested handler name.

func NewTest Uses

func NewTest(
    channel chan metric.Metric,
    initialInterval int,
    initialBufferSize int,
    initialTimeout time.Duration,
    log *l.Entry) Handler

NewTest returns a new Test handler.

type Kairos Uses

type Kairos struct {
    BaseHandler
    // contains filtered or unexported fields
}

Kairos handler

func (*Kairos) Configure Uses

func (k *Kairos) Configure(configMap map[string]interface{})

Configure the Kairos handler

func (Kairos) Port Uses

func (k Kairos) Port() string

Port returns the Kairos server's port number

func (*Kairos) Run Uses

func (k *Kairos) Run()

Run runs the handler main loop

func (Kairos) Server Uses

func (k Kairos) Server() string

Server returns the Kairos server's hostname or IP address

type KairosMetric Uses

type KairosMetric struct {
    Name       string            `json:"name"`
    Timestamp  int64             `json:"timestamp"`
    MetricType string            `json:"type"`
    Value      float64           `json:"value"`
    Tags       map[string]string `json:"tags"`
}

KairosMetric structure

type Log Uses

type Log struct {
    BaseHandler
}

Log type

func (*Log) Configure Uses

func (h *Log) Configure(configMap map[string]interface{})

Configure accepts the different configuration options for the Log handler

func (*Log) Run Uses

func (h *Log) Run()

Run runs the handler main loop

type MetricType Uses

type MetricType int32
const (
    // *
    // Numerical: Periodic, instantaneous measurement of some state.
    MetricType_GAUGE MetricType = 0
    // *
    // Numerical: Count of occurrences. Generally non-negative integers.
    MetricType_COUNTER MetricType = 1
    // *
    // String: Used for non-continuous quantities (that is, measurements where there is a fixed
    // set of meaningful values). This is essentially a special case of gauge.
    MetricType_ENUM MetricType = 2
    // *
    // Tracks a value that increases over time, where only the difference is important.
    MetricType_CUMULATIVE_COUNTER MetricType = 3
)

func (MetricType) Enum Uses

func (x MetricType) Enum() *MetricType

func (MetricType) String Uses

func (x MetricType) String() string

func (*MetricType) UnmarshalJSON Uses

func (x *MetricType) UnmarshalJSON(data []byte) error

type PointValue Uses

type PointValue struct {
    Timestamp        *int64 `protobuf:"varint,3,opt,name=timestamp" json:"timestamp,omitempty"`
    Value            *Datum `protobuf:"bytes,4,opt,name=value" json:"value,omitempty"`
    XXX_unrecognized []byte `json:"-"`
}

func (*PointValue) GetTimestamp Uses

func (m *PointValue) GetTimestamp() int64

func (*PointValue) GetValue Uses

func (m *PointValue) GetValue() *Datum

func (*PointValue) ProtoMessage Uses

func (*PointValue) ProtoMessage()

func (*PointValue) Reset Uses

func (m *PointValue) Reset()

func (*PointValue) String Uses

func (m *PointValue) String() string

type Scribe Uses

type Scribe struct {
    BaseHandler
    // contains filtered or unexported fields
}

Scribe Handler

func (*Scribe) Configure Uses

func (s *Scribe) Configure(configMap map[string]interface{})

Configure accepts the different configuration options for the Scribe handler

func (*Scribe) Run Uses

func (s *Scribe) Run()

Run runs the handler main loop

type SignalFx Uses

type SignalFx struct {
    BaseHandler
    // contains filtered or unexported fields
}

SignalFx Handler

func (*SignalFx) Configure Uses

func (s *SignalFx) Configure(configMap map[string]interface{})

Configure accepts the different configuration options for the signalfx handler

func (SignalFx) Endpoint Uses

func (s SignalFx) Endpoint() string

Endpoint returns SignalFx' API endpoint

func (*SignalFx) Run Uses

func (s *SignalFx) Run()

Run runs the handler main loop

type Test Uses

type Test struct {
    BaseHandler
}

Test type

func (*Test) Configure Uses

func (h *Test) Configure(configMap map[string]interface{})

Configure accepts the different configuration options for the Test handler

func (*Test) Run Uses

func (h *Test) Run()

Run runs the handler main loop

type Wavefront Uses

type Wavefront struct {
    BaseHandler
    // contains filtered or unexported fields
}

Wavefront handler

func (*Wavefront) Configure Uses

func (w *Wavefront) Configure(configMap map[string]interface{})

Configure the Wavefront handler

func (Wavefront) Endpoint Uses

func (w Wavefront) Endpoint() string

Endpoint returns the Wavefront API endpoint

func (*Wavefront) Run Uses

func (w *Wavefront) Run()

Run runs the handler main loop

Package handler imports 22 packages (graph). Updated 2019-05-31. Refresh now. Tools for package owners.

The go get command cannot install this package because of the following issues: