MCPcopy
hub / github.com/grafana/tempo / SendError

Method SendError

modules/frontend/pipeline/responses.go:123–129  ·  view source on GitHub ↗

SendError sends an error to the asyncResponse. This will cause the asyncResponse to return the error on the next call to Next. we send on a channel to give errors the chance to unblock the select below. we also store in an atomic error so that a Responses in error will always remain in error

(err error)

Source from the content-addressed store, hash-verified

121// we send on a channel to give errors the chance to unblock the select below. we also store in an atomic error so that
122// a Responses in error will always remain in error
123func (a *asyncResponse) SendError(err error) {
124 select {
125 case a.errChan <- err:
126 a.err.Store(err)
127 default:
128 }
129}
130
131// SendComplete indicates the sender is done. We close the channel to give a clear signal to the consumer
132func (a *asyncResponse) SendComplete() {

Callers 3

NewAsyncSharderFuncFunction · 0.80
NewAsyncSharderChanFunction · 0.80

Calls 1

StoreMethod · 0.65

Tested by 1