Skip to content

Commit

Permalink
Remove Namespace Parameter For NewFactoryWithConfig
Browse files Browse the repository at this point in the history
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
  • Loading branch information
mahadzaryab1 committed Nov 3, 2024
1 parent 209b834 commit 89c7c70
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions plugin/storage/es/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ func NewFactory(namespace string) *Factory {

func NewFactoryWithConfig(
cfg config.Configuration,
namespace string,
metricsFactory metrics.Factory,
logger *zap.Logger,
) (*Factory, error) {
Expand All @@ -86,13 +85,11 @@ func NewFactoryWithConfig(
defaultConfig := DefaultConfig()
cfg.ApplyDefaults(&defaultConfig)

f := NewFactory(namespace)
f.configureFromOptions(&Options{
Primary: namespaceConfig{
Configuration: cfg,
namespace: namespace,
},
})
f := &Factory{
config: &cfg,
newClientFn: config.NewClient,
tracer: otel.GetTracerProvider(),
}
err := f.Initialize(metricsFactory, logger)
if err != nil {
return nil, err
Expand Down

0 comments on commit 89c7c70

Please sign in to comment.