ingester

package
v0.0.0-...-babdfd8 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

This file contains some modifications to the source code of VictoriaMetrics.

https://github.com/VictoriaMetrics/VictoriaMetrics/blob/9e8733ff65ac9a540b0d8367d97f501a965498f0/app/vminsert/common/insert_ctx.go

This file contains some modifications to the source code of VictoriaMetrics.

https://github.com/VictoriaMetrics/VictoriaMetrics/blob/9e8733ff65ac9a540b0d8367d97f501a965498f0/app/vminsert/common/insert_ctx_pool.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PutInsertCtx

func PutInsertCtx(ctx *InsertCtx)

PutInsertCtx returns ctx to the pool.

ctx cannot be used after the call.

func Serve

func Serve(addr string) error

Serve runs a server.

Types

type InsertCtx

type InsertCtx struct {
	Labels []prompb.Label
	// contains filtered or unexported fields
}

InsertCtx contains common bits for data points insertion.

func GetInsertCtx

func GetInsertCtx() *InsertCtx

GetInsertCtx returns InsertCtx from the pool.

Call PutInsertCtx for returning it to the pool.

func (*InsertCtx) AddLabel

func (ctx *InsertCtx) AddLabel(name, value string)

AddLabel adds (name, value) label to ctx.Labels.

name and value must exist until ctx.Labels is used.

func (*InsertCtx) FlushBufs

func (ctx *InsertCtx) FlushBufs() error

FlushBufs flushes buffered rows to the underlying storage.

func (*InsertCtx) Reset

func (ctx *InsertCtx) Reset(rowsLen int)

Reset resets ctx for future fill with rowsLen rows.

func (*InsertCtx) WriteDataPoint

func (ctx *InsertCtx) WriteDataPoint(prefix []byte, labels []prompb.Label, timestamp int64, value float64)

WriteDataPoint writes (timestamp, value) with the given prefix and labels into ctx buffer.

Jump to

Keyboard shortcuts

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