collector

package
v0.0.0-...-1b5f0b1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2017 License: GPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateID

func GenerateID(rcvMsg *gorilla.TSDBpoint) string

Types

type BulkType

type BulkType struct {
	ID EsIndex `json:"index"`
}

type Collector

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

func New

func New(
	log *zap.Logger,
	sts *tsstats.StatsTS,
	cluster *cluster.Cluster,
	meta *meta.Meta,
	cass *depot.Cassandra,
	es *rubber.Elastic,
	bc *bcache.Bcache,
	set *structs.Settings,
) (*Collector, error)

func (*Collector) CheckUDPbind

func (collect *Collector) CheckUDPbind() bool

func (*Collector) HandleGerr

func (collect *Collector) HandleGerr(ks string, returnPoints *RestErrors, rcvMsg gorilla.TSDBpoint, gerr gobol.Error)

func (*Collector) HandlePoint

func (collect *Collector) HandlePoint(points gorilla.TSDBpoints) (RestErrors, gobol.Error)

func (*Collector) HandlePointUDP

func (collect *Collector) HandlePointUDP(point gorilla.TSDBpoint) gobol.Error

func (*Collector) HandleTxtPacket

func (collect *Collector) HandleTxtPacket(rcvMsg gorilla.TSDBpoint) gobol.Error

func (*Collector) HandleUDPpacket

func (collector *Collector) HandleUDPpacket(buf []byte, addr string)

func (*Collector) ReceivedErrorRatio

func (collect *Collector) ReceivedErrorRatio() float64

func (*Collector) Scollector

func (collect *Collector) Scollector(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*Collector) Stop

func (collect *Collector) Stop()

func (*Collector) Text

func (collect *Collector) Text(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

type EsIndex

type EsIndex struct {
	EsID    string `json:"_id"`
	EsType  string `json:"_type"`
	EsIndex string `json:"_index"`
}

type EsMetric

type EsMetric struct {
	Metric string `json:"metric"`
}

type EsTagKey

type EsTagKey struct {
	Key string `json:"key"`
}

type EsTagValue

type EsTagValue struct {
	Value string `json:"value"`
}

type LogMeta

type LogMeta struct {
	Action string   `json:"action"`
	Meta   MetaInfo `json:"meta"`
}

type MetaInfo

type MetaInfo struct {
	Metric string `json:"metric"`
	ID     string `json:"id"`
	Tags   []Tag  `json:"tagsNested"`
}

type RestError

type RestError struct {
	Datapoint gorilla.TSDBpoint `json:"datapoint"`
	Gerr      gobol.Error       `json:"error"`
}

type RestErrorUser

type RestErrorUser struct {
	Datapoint gorilla.TSDBpoint `json:"datapoint"`
	Error     string            `json:"error"`
}

type RestErrors

type RestErrors struct {
	Errors  []RestErrorUser `json:"errors"`
	Failed  int             `json:"failed"`
	Success int             `json:"success"`
}

type StructV2Error

type StructV2Error struct {
	Key    string `json:"key"`
	Metric string `json:"metric"`
	Tags   []Tag  `json:"tagsError"`
}

type Tag

type Tag struct {
	Key   string `json:"tagKey"`
	Value string `json:"tagValue"`
}

type UDPv1

type UDPv1 struct {
}

func (UDPv1) HandleUDPpacket

func (v1 UDPv1) HandleUDPpacket(buf []byte, addr string)

func (UDPv1) Stop

func (v1 UDPv1) Stop()

Jump to

Keyboard shortcuts

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