MCPcopy
hub / github.com/prometheus/prometheus / AppenderV2

Method AppenderV2

util/teststorage/appender.go:547–559  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

545}
546
547func (a *Appendable) AppenderV2(ctx context.Context) storage.AppenderV2 {
548 ret := &appenderV2{baseAppender: baseAppender{a: a}}
549 if a.openAppenders.Inc() > 1 {
550 ret.err = errors.New("teststorage.Appendable.AppenderV2() concurrent use is not supported; attempted opening new AppenderV2() without Commit/Rollback of the previous one. Extend the implementation if concurrent mock is needed")
551 return ret
552 }
553
554 if a.next != nil {
555 app := a.next.AppenderV2(ctx)
556 ret.next, ret.nextTr = app, app
557 }
558 return ret
559}
560
561func (a *appenderV2) Append(ref storage.SeriesRef, ls labels.Labels, st, t int64, v float64, h *histogram.Histogram, fh *histogram.FloatHistogram, opts storage.AOptions) (_ storage.SeriesRef, err error) {
562 if err := a.checkErr(); err != nil {

Implementers 15

Headtsdb/head.go
BlockWritertsdb/blockwriter.go
CircularExemplarStoragetsdb/exemplar.go
DBtsdb/db.go
XOR2Chunktsdb/chunkenc/xor2.go
HistogramChunktsdb/chunkenc/histogram.go
XORChunktsdb/chunkenc/xor.go
FloatHistogramChunktsdb/chunkenc/float_histogram.go
DBtsdb/agent/db.go
fanoutstorage/fanout.go
errStoragestorage/fanout_test.go
mockStoragestorage/fanout_test.go

Calls 2

IncMethod · 0.80
AppenderV2Method · 0.65