MCPcopy Create free account
hub / github.com/cortexproject/cortex / SendQueryStream

Function SendQueryStream

pkg/ingester/client/cortex_util.go:9–13  ·  view source on GitHub ↗

SendQueryStream wraps the stream's Send() checking if the context is done before calling Send().

(s Ingester_QueryStreamServer, m *QueryStreamResponse)

Source from the content-addressed store, hash-verified

7// SendQueryStream wraps the stream's Send() checking if the context is done
8// before calling Send().
9func SendQueryStream(s Ingester_QueryStreamServer, m *QueryStreamResponse) error {
10 return sendWithContextErrChecking(s.Context(), func() error {
11 return s.Send(m)
12 })
13}
14
15func SendMetricsForLabelMatchersStream(s Ingester_MetricsForLabelMatchersStreamServer, m *MetricsForLabelMatchersStreamResponse) error {
16 return sendWithContextErrChecking(s.Context(), func() error {

Callers 2

queryStreamChunksMethod · 0.92
TestStreamingSendsFunction · 0.85

Calls 3

SendMethod · 0.65
ContextMethod · 0.45

Tested by 1

TestStreamingSendsFunction · 0.68