@@ -30,7 +30,6 @@ import (
30
30
"github.com/cortexproject/cortex/pkg/chunk/purger"
31
31
"github.com/cortexproject/cortex/pkg/compactor"
32
32
"github.com/cortexproject/cortex/pkg/distributor"
33
- "github.com/cortexproject/cortex/pkg/ingester"
34
33
"github.com/cortexproject/cortex/pkg/ingester/client"
35
34
"github.com/cortexproject/cortex/pkg/querier"
36
35
"github.com/cortexproject/cortex/pkg/querier/frontend"
@@ -201,8 +200,17 @@ func (a *API) RegisterDistributor(d *distributor.Distributor, pushConfig distrib
201
200
a .RegisterRoute ("/ha-tracker" , d .HATracker , false , "GET" )
202
201
}
203
202
203
+ // ingester is defined as an interface to allow for alternative implementations
204
+ // of ingesters to be passed into the API.RegisterIngester() method.
205
+ type ingester interface {
206
+ client.IngesterServer
207
+ FlushHandler (http.ResponseWriter , * http.Request )
208
+ ShutdownHandler (http.ResponseWriter , * http.Request )
209
+ Push (context.Context , * client.WriteRequest ) (* client.WriteResponse , error )
210
+ }
211
+
204
212
// RegisterIngester registers the ingesters HTTP and GRPC service
205
- func (a * API ) RegisterIngester (i * ingester. Ingester , pushConfig distributor.Config ) {
213
+ func (a * API ) RegisterIngester (i ingester , pushConfig distributor.Config ) {
206
214
client .RegisterIngesterServer (a .server .GRPC , i )
207
215
208
216
a .indexPage .AddLink (SectionDangerous , "/ingester/flush" , "Trigger a Flush of data from Ingester to storage" )
0 commit comments