remote_write

package
v0.0.0-...-2947ea4 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UNIQUE_KEY              = "unique_key"
	METRIC_TIMESTAMP        = "metric_timestamp"
	KAFKA_KEY               = "kafka_key"
	COUNT_KEY               = "count_key"
	MILIONSECONDS_IN_MINUTE = 60000
)

Variables

View Source
var (
	GROUP             = "group"
	SDU               = "sdu"
	NAME              = "__name__"
	CMDB_SERVICE_NAME = "cmdb_service_name"
	DATACENTER        = "datacenter"
	KEY_SPLIE_FLAG    = "===="
)

Functions

func GetLastPoint

func GetLastPoint(tss []*prompb.TimeSeries) *prompb.TimeSeries

func ParseFromPipelineMessage

func ParseFromPipelineMessage(m *service.Message, metaKey, funName string, logger *service.Logger) (*prompb.WriteRequest, string)

func ParseFromPipelineMessageV2

func ParseFromPipelineMessageV2(m *service.Message, funName string, logger *service.Logger) *prompb.WriteRequest

func ToMessage

func ToMessage(log service.Logger, data []*prompb.TimeSeries, key string) *service.Message

func ToMessageWithoutKey

func ToMessageWithoutKey(log *service.Logger, data []*prompb.TimeSeries) *service.Message

Types

type MessageBuilder

type MessageBuilder struct {
	MessagePool sync.Pool
}

func NewMessageBuilder

func NewMessageBuilder(cap int) *MessageBuilder

func (*MessageBuilder) Get

func (m *MessageBuilder) Get() []*service.Message

func (*MessageBuilder) Put

func (m *MessageBuilder) Put(x []*service.Message)

func (*MessageBuilder) ToMessages

func (m *MessageBuilder) ToMessages(log *service.Logger, data []*prompb.TimeSeries, key string, limit int) []*service.Message

type RemoteWriterBuilder

type RemoteWriterBuilder struct {
	BsPool sync.Pool
}

func NewRemoteWriterBuilder

func NewRemoteWriterBuilder(cap int) *RemoteWriterBuilder

func (*RemoteWriterBuilder) Get

func (r *RemoteWriterBuilder) Get() []byte

func (*RemoteWriterBuilder) Put

func (r *RemoteWriterBuilder) Put(x []byte)

func (*RemoteWriterBuilder) RequestWithLimitBodySize

func (r *RemoteWriterBuilder) RequestWithLimitBodySize(log *service.Logger, urls []string, ctx context.Context, client *http.Client,
	data []byte, count int)

type StrBuilder

type StrBuilder struct {
	BsPool sync.Pool
}

func NewStrBuilder

func NewStrBuilder(cap int) *StrBuilder

func (*StrBuilder) Connect

func (s *StrBuilder) Connect(ss ...string) string

func (*StrBuilder) Get

func (s *StrBuilder) Get() []byte

func (*StrBuilder) GetUniqueKeyV1

func (s *StrBuilder) GetUniqueKeyV1(timeSeries *prompb.TimeSeries) string

func (*StrBuilder) GetUniqueKeyV2

func (s *StrBuilder) GetUniqueKeyV2(timeSeries *prompb.TimeSeries) string

func (*StrBuilder) Put

func (s *StrBuilder) Put(x []byte)

type TsBuilder

type TsBuilder struct {
	TsPool sync.Pool
}

func NewTsBuilder

func NewTsBuilder(cap int) *TsBuilder

func (*TsBuilder) Get

func (t *TsBuilder) Get() []*prompb.TimeSeries

func (*TsBuilder) Put

func (t *TsBuilder) Put(x []*prompb.TimeSeries)

type TssBuilder

type TssBuilder struct {
	TssPool sync.Pool
}

func NewTssBuilder

func NewTssBuilder(cap int) *TssBuilder

func (*TssBuilder) Get

func (t *TssBuilder) Get() [][]*prompb.TimeSeries

func (*TssBuilder) Put

func (t *TssBuilder) Put(x [][]*prompb.TimeSeries)

Jump to

Keyboard shortcuts

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