feat(ingestion): use consistent naming for handler instead of API

This commit is contained in:
vikrantgupta25
2025-12-16 14:27:14 +05:30
parent 4b930a3288
commit c5daa4e0c1
4 changed files with 7 additions and 7 deletions

View File

@@ -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)
}

View File

@@ -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}
}

View File

@@ -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),
}
}

View File

@@ -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),
),
)
}