Martin Disibio 5d540e119f Move all intrinsic tag lookup to the query-frontend and prioritize them in the results (#4784)
* Move all intrinsic tag lookup to the query-frontend and prioritize them in the results

* lint, error handling, fix tests

* Fix some tests

* Revert unintended change to search/tags v1 behavior, update tests

* Reduce diff

* Revert unintended change to 'none' scope

* reduce diff

* changelog

* Update test to test intrinsic handling at the limit

* todos
2025-03-04 15:12:03 -05:00

31 lines
615 B
Go

package combiner
import (
"net/http"
)
// Combiner is used to merge multiple responses into a single response.
//
// Implementations must be thread-safe.
// TODO: StatusCode() is only used for multi-tenant support. Can we remove it?
type Combiner interface {
AddResponse(r PipelineResponse) error
StatusCode() int
ShouldQuit() bool
// returns the final/complete results
HTTPFinal() (*http.Response, error)
}
type TypedCombiner[T TResponse] interface {
AddTypedResponse(r T) error
}
type GRPCCombiner[T TResponse] interface {
Combiner
TypedCombiner[T]
GRPCFinal() (T, error)
GRPCDiff() (T, error)
}