collector

package
v2.28.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: GPL-3.0 Imports: 25 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BulkType

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

type Collector

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

Collector - implements a point collector structure

func New

func New(
	tm *tlmanager.TimelineManager,
	cass *gocql.Session,
	metaStorage *metadata.Storage,
	set *structs.Settings,
	keyspaceTTLMap map[int]string,
	validation *validation.Service,
) (*Collector, error)

New - creates a new Collector

func (*Collector) AddMetadata

func (collect *Collector) AddMetadata(collection string, m *metadata.Metadata) gobol.Error

AddMetadata - adds a new document metadata

func (*Collector) CheckMetadata

func (collect *Collector) CheckMetadata(index, tsType, id string, idByte []byte) (bool, gobol.Error)

CheckMetadata - checks for the metadata existence

func (*Collector) GenerateID

func (collect *Collector) GenerateID(rcvMsg *structs.TSDBpoint) (string, []byte, error)

GenerateID - generates the unique ID from a point

func (*Collector) HandleJSONBytes

func (collect *Collector) HandleJSONBytes(data []byte, sourceType *constants.SourceType, ip string, isNumber bool) (int, gobol.Error)

HandleJSONBytes - handles a point in byte format

func (*Collector) HandleNumber

func (collect *Collector) HandleNumber(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

HandleNumber - handles the point in number format

func (*Collector) HandlePacket

func (collect *Collector) HandlePacket(vp *Point, source *constants.SourceType)

HandlePacket - handles a point in struct format

func (*Collector) HandleText

func (collect *Collector) HandleText(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

HandleText - handles the point in text format

func (*Collector) HandleUDPpacket

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

HandleUDPpacket - handles the UDP packet received from the collector

func (*Collector) InsertPoint

func (collect *Collector) InsertPoint(ksid, tsid string, timestamp int64, value float64) gobol.Error

func (*Collector) InsertText

func (collect *Collector) InsertText(ksid, tsid string, timestamp int64, text string) gobol.Error

func (*Collector) MakePacket

func (collect *Collector) MakePacket(rcvMsg *structs.TSDBpoint, number bool) (*Point, gobol.Error)

MakePacket - validates a point and fills the packet

func (*Collector) ParsePoint

func (collect *Collector) ParsePoint(function string, isNumber bool, data []byte) (*structs.TSDBpoint, string, gobol.Error)

ParsePoint - parses the json bytes to the object fields (seconds return is the keyset)

func (*Collector) ParsePointArray

func (collect *Collector) ParsePointArray(function string, isNumber bool, data []byte, outPoints *structs.TSDBpoints, outErrs *[]gobol.Error) (keyset string)

ParsePointArray - parses an array of points

func (*Collector) ParsePoints

func (collect *Collector) ParsePoints(function string, isNumber bool, data []byte, outPoints *structs.TSDBpoints, outErrs *[]gobol.Error) string

ParsePoints - parses an array of points

func (*Collector) Stop

func (collect *Collector) Stop()

Stop - stops the UDP collector

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 *structs.TSDBpoint
	ID      string
	HashID  []byte
	Number  bool
}

type RestError

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

type RestErrorUser

type RestErrorUser struct {
	Datapoint structs.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 Tag

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

Jump to

Keyboard shortcuts

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