Documentation ¶
Index ¶
- Constants
- Variables
- func GetLastPoint(tss []*prompb.TimeSeries) *prompb.TimeSeries
- func ParseFromPipelineMessage(m *service.Message, metaKey, funName string, logger *service.Logger) (*prompb.WriteRequest, string)
- func ParseFromPipelineMessageV2(m *service.Message, funName string, logger *service.Logger) *prompb.WriteRequest
- func ToMessage(log service.Logger, data []*prompb.TimeSeries, key string) *service.Message
- func ToMessageWithoutKey(log *service.Logger, data []*prompb.TimeSeries) *service.Message
- type MessageBuilder
- type RemoteWriterBuilder
- type StrBuilder
- type TsBuilder
- type TssBuilder
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 ToMessageWithoutKey ¶
Types ¶
type MessageBuilder ¶
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 ¶
func NewRemoteWriterBuilder ¶
func NewRemoteWriterBuilder(cap int) *RemoteWriterBuilder
func (*RemoteWriterBuilder) Get ¶
func (r *RemoteWriterBuilder) Get() []byte
func (*RemoteWriterBuilder) Put ¶
func (r *RemoteWriterBuilder) Put(x []byte)
type StrBuilder ¶
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 ¶
func NewTsBuilder ¶
func (*TsBuilder) Get ¶
func (t *TsBuilder) Get() []*prompb.TimeSeries
func (*TsBuilder) Put ¶
func (t *TsBuilder) Put(x []*prompb.TimeSeries)
type TssBuilder ¶
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)
Click to show internal directories.
Click to hide internal directories.