collector

package
v2.10.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2018 License: GPL-3.0 Imports: 24 Imported by: 4

Documentation

Index

Constants

View Source
const (
	SECOND int64 = 1000000000
)

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,
	metaStorage *metadata.Storage,
	set *structs.Settings,
	keyspaceTTLMap map[int]string,
	ks *keyset.KeySet,
) (*Collector, error)

func (*Collector) HandleNumber

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

func (*Collector) HandleNumberTelnetFormat

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

func (*Collector) HandlePacket

func (collect *Collector) HandlePacket(rcvMsg TSDBpoint, vp *Point, number bool, source string, logFields map[string]string)

func (*Collector) HandleText

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

func (*Collector) HandleUDPpacket

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

func (*Collector) ReceivedErrorRatio

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

func (*Collector) Stop

func (collect *Collector) Stop()

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
	Keyset    string
	Timestamp int64
	Number    bool
	TTL       int
}

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"`
}

Jump to

Keyboard shortcuts

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