From 31a39e117a6583c122fef4f28a98af8a9d7aa1a9 Mon Sep 17 00:00:00 2001 From: Przemyslaw Delewski <102958445+pdelewski@users.noreply.github.com> Date: Tue, 24 Dec 2024 11:48:12 +0100 Subject: [PATCH] v2 - Removing redundant dependency injection code (#1139) This PR removes some redundant code already handled by embedded struct --- .../elastic_http_frontend_connector.go | 32 ------------------- 1 file changed, 32 deletions(-) diff --git a/quesma/frontend_connectors/elastic_http_frontend_connector.go b/quesma/frontend_connectors/elastic_http_frontend_connector.go index a7fb4b7b3..ba41ffc1c 100644 --- a/quesma/frontend_connectors/elastic_http_frontend_connector.go +++ b/quesma/frontend_connectors/elastic_http_frontend_connector.go @@ -10,15 +10,10 @@ import ( "quesma/quesma/config" "quesma/schema" quesma_api "quesma_v2/core" - "quesma_v2/core/diag" ) type ElasticHttpIngestFrontendConnector struct { *BasicHTTPFrontendConnector - - Config *config.QuesmaConfiguration - - phoneHomeClient diag.PhoneHomeClient } func NewElasticHttpIngestFrontendConnector(endpoint string, @@ -40,23 +35,8 @@ func NewElasticHttpIngestFrontendConnector(endpoint string, return fc } -func (h *ElasticHttpIngestFrontendConnector) GetChildComponents() []interface{} { - components := make([]interface{}, 0) - if h.BasicHTTPFrontendConnector != nil { - components = append(components, h.BasicHTTPFrontendConnector) - } - - return components -} - -func (h *ElasticHttpIngestFrontendConnector) SetDependencies(deps quesma_api.Dependencies) { - h.phoneHomeClient = deps.PhoneHomeAgent() -} - type ElasticHttpQueryFrontendConnector struct { *BasicHTTPFrontendConnector - - phoneHomeClient diag.PhoneHomeClient } func NewElasticHttpQueryFrontendConnector(endpoint string, @@ -75,15 +55,3 @@ func NewElasticHttpQueryFrontendConnector(endpoint string, fc.AddRouter(router) return fc } - -func (h *ElasticHttpQueryFrontendConnector) GetChildComponents() []interface{} { - components := make([]interface{}, 0) - if h.BasicHTTPFrontendConnector != nil { - components = append(components, h.BasicHTTPFrontendConnector) - } - return components -} - -func (h *ElasticHttpQueryFrontendConnector) SetDependencies(deps quesma_api.Dependencies) { - h.phoneHomeClient = deps.PhoneHomeAgent() -}