mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
69 lines
2.5 KiB
Go
69 lines
2.5 KiB
Go
// Code generated by qtc from "bulk_response.qtpl". DO NOT EDIT.
|
|
// See https://github.com/valyala/quicktemplate for details.
|
|
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:3
|
|
package elasticsearch
|
|
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:3
|
|
import (
|
|
qtio422016 "io"
|
|
|
|
qt422016 "github.com/valyala/quicktemplate"
|
|
)
|
|
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:3
|
|
var (
|
|
_ = qtio422016.Copy
|
|
_ = qt422016.AcquireByteBuffer
|
|
)
|
|
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:3
|
|
func StreamBulkResponse(qw422016 *qt422016.Writer, n int, tookMs int64) {
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:3
|
|
qw422016.N().S(`{"took":`)
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:5
|
|
qw422016.N().DL(tookMs)
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:5
|
|
qw422016.N().S(`,"errors":false,"items":[`)
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:8
|
|
for i := 0; i < n; i++ {
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:8
|
|
qw422016.N().S(`{"create":{"status":201}}`)
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:14
|
|
if i+1 < n {
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:14
|
|
qw422016.N().S(`,`)
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:14
|
|
}
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:15
|
|
}
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:15
|
|
qw422016.N().S(`]}`)
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:18
|
|
}
|
|
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:18
|
|
func WriteBulkResponse(qq422016 qtio422016.Writer, n int, tookMs int64) {
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:18
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:18
|
|
StreamBulkResponse(qw422016, n, tookMs)
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:18
|
|
qt422016.ReleaseWriter(qw422016)
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:18
|
|
}
|
|
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:18
|
|
func BulkResponse(n int, tookMs int64) string {
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:18
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:18
|
|
WriteBulkResponse(qb422016, n, tookMs)
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:18
|
|
qs422016 := string(qb422016.B)
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:18
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:18
|
|
return qs422016
|
|
//line app/vlinsert/elasticsearch/bulk_response.qtpl:18
|
|
}
|