diff --git a/pkg/ingestion/ingestion.go b/pkg/ingestion/ingestion.go index eb0ca45293..9d10e0c4aa 100644 --- a/pkg/ingestion/ingestion.go +++ b/pkg/ingestion/ingestion.go @@ -4,10 +4,10 @@ import ( "net/http" ) -type Handler interface { - Get(http.ResponseWriter, *http.Request) -} - type Ingestion interface { GetConfig() Config } + +type Handler interface { + Get(http.ResponseWriter, *http.Request) +} diff --git a/pkg/ingestion/signozingestion/api.go b/pkg/ingestion/signozingestion/handler.go similarity index 87% rename from pkg/ingestion/signozingestion/api.go rename to pkg/ingestion/signozingestion/handler.go index bc52d1bffa..321bac9b0f 100644 --- a/pkg/ingestion/signozingestion/api.go +++ b/pkg/ingestion/signozingestion/handler.go @@ -12,7 +12,7 @@ type signozapi struct { ingestion ingestion.Ingestion } -func NewAPI(ingestion ingestion.Ingestion) ingestion.Handler { +func NewHandler(ingestion ingestion.Ingestion) ingestion.Handler { return &signozapi{ingestion: ingestion} } diff --git a/pkg/signoz/handler.go b/pkg/signoz/handler.go index 52978d49c7..5d97879342 100644 --- a/pkg/signoz/handler.go +++ b/pkg/signoz/handler.go @@ -50,6 +50,6 @@ func NewHandlers(modules Modules, providerSettings factory.ProviderSettings, que Services: implservices.NewHandler(modules.Services), MetricsExplorer: implmetricsexplorer.NewHandler(modules.MetricsExplorer), SpanPercentile: implspanpercentile.NewHandler(modules.SpanPercentile), - Ingestion: signozingestion.NewAPI(ingestion), + Ingestion: signozingestion.NewHandler(ingestion), } } diff --git a/pkg/signoz/provider.go b/pkg/signoz/provider.go index 83f402cc7c..82ca867c1a 100644 --- a/pkg/signoz/provider.go +++ b/pkg/signoz/provider.go @@ -233,7 +233,7 @@ func NewAPIServerProviderFactories(orgGetter organization.Getter, authz authz.Au implsession.NewHandler(modules.Session), implauthdomain.NewHandler(modules.AuthDomain), implpreference.NewHandler(modules.Preference), - signozingestion.NewAPI(ingestion), + signozingestion.NewHandler(ingestion), ), ) }