collector

package
v0.0.0-...-1809aa5 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2017 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateID

func GenerateID(rcvMsg 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 *structs.TsLog,
	sts *tsstats.StatsTS,
	cass *gocql.Session,
	es *rubber.Elastic,
	bc *bcache.Bcache,
	set *structs.Settings,
	consist []gocql.Consistency,
) (*Collector, error)

func (*Collector) CheckTSID

func (collect *Collector) CheckTSID(esType, id string) (bool, gobol.Error)

func (*Collector) CheckUDPbind

func (collect *Collector) CheckUDPbind() bool

func (*Collector) HandlePacket

func (collect *Collector) HandlePacket(rcvMsg TSDBpoint, number bool) gobol.Error

func (*Collector) HandleUDPpacket

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

func (*Collector) ReceivedErrorRatio

func (collect *Collector) ReceivedErrorRatio() (ratio float64)

func (*Collector) Scollector

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

func (*Collector) SetConsistencies

func (collect *Collector) SetConsistencies(consistencies []gocql.Consistency)

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 Point

type Point struct {
	Message   TSDBpoint
	ID        string
	Bucket    string
	KsID      string
	Timestamp int64
	Tuuid     bool
	TimeUUID  gocql.UUID
	Number    bool
}

type RestError

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

type RestErrorUser

type RestErrorUser struct {
	Datapoint TSDBpoint   `json:"datapoint"`
	Error     interface{} `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 TSDBpoint

type TSDBpoint struct {
	Metric    string            `json:"metric,omitempty"`
	Timestamp int64             `json:"timestamp,omitempty"`
	Value     *float64          `json:"value,omitempty"`
	Text      string            `json:"text,omitempty"`
	Tags      map[string]string `json:"tags,omitempty"`
}

type TSDBpoints

type TSDBpoints []TSDBpoint

func (TSDBpoints) Validate

func (p TSDBpoints) Validate() gobol.Error

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