Skip to content

Commit

Permalink
Remove unused config
Browse files Browse the repository at this point in the history
  • Loading branch information
ykadowak committed Sep 26, 2023
1 parent ce78ccf commit ef2e20d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 0 additions & 9 deletions pkg/index/job/correction/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ type Data struct {

// Indexer represent agent auto indexing service configuration
Corrector *config.Corrector `json:"corrector" yaml:"corrector"`

// Gateway represent agent gateway service configuration
Gateway *config.LB `json:"gateway" yaml:"gateway"`
}

func NewConfig(path string) (cfg *Data, err error) {
Expand Down Expand Up @@ -75,11 +72,5 @@ func NewConfig(path string) (cfg *Data, err error) {
cfg.Corrector = new(config.Corrector).Bind()
}

if cfg.Gateway != nil {
cfg.Gateway = cfg.Gateway.Bind()
} else {
cfg.Gateway = new(config.LB).Bind()
}

return cfg, nil
}
2 changes: 1 addition & 1 deletion pkg/index/job/correction/usecase/corrector.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type run struct {
}

func New(cfg *config.Data) (r runner.Runner, err error) {
if cfg.Gateway.IndexReplica == 1 {
if cfg.Corrector.IndexReplica == 1 {
return nil, errors.ErrIndexReplicaOne
}

Expand Down

0 comments on commit ef2e20d

Please sign in to comment.