writer

package
v5.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Writers = NewWriters()

Functions

func Init

func Init(opts []config.WriterOptions, globalOpt config.WriterGlobalOpt) error

Types

type WriterType

type WriterType struct {
	Opts   config.WriterOptions
	Client api.Client
}

func (WriterType) Post

func (w WriterType) Post(req []byte, headers ...map[string]string) error

func (WriterType) Write

func (w WriterType) Write(index int, items []*prompb.TimeSeries, headers ...map[string]string)

type WritersType

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

func NewWriters

func NewWriters() WritersType

func (*WritersType) PushSample added in v5.6.1

func (ws *WritersType) PushSample(ident string, v interface{})

PushSample Push one sample to chan, hash by ident @Author: quzhihao

func (*WritersType) Put

func (ws *WritersType) Put(name string, writer WriterType)

func (*WritersType) StartConsumer added in v5.6.1

func (ws *WritersType) StartConsumer(index int, ch chan *prompb.TimeSeries)

StartConsumer every ident channel has a consumer, start it @Author: quzhihao

Jump to

Keyboard shortcuts

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