MCPcopy
hub / github.com/elastic/go-elasticsearch / newBulkFunc

Function newBulkFunc

esapi/api.bulk.go:31–44  ·  view source on GitHub ↗
(t Transport)

Source from the content-addressed store, hash-verified

29)
30
31func newBulkFunc(t Transport) Bulk {
32 return func(body io.Reader, o ...func(*BulkRequest)) (*Response, error) {
33 var r = BulkRequest{Body: body}
34 for _, f := range o {
35 f(&r)
36 }
37
38 if transport, ok := t.(Instrumented); ok {
39 r.Instrument = transport.InstrumentationEnabled()
40 }
41
42 return r.Do(r.ctx, t)
43 }
44}
45
46// ----- API Definition -------------------------------------------------------
47

Callers 1

NewFunction · 0.85

Calls 2

DoMethod · 0.65

Tested by

no test coverage detected