Skip to content

Commit

Permalink
consume new client in esutil package (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrparkers committed May 3, 2021
1 parent 289be2a commit 5c2d664
Show file tree
Hide file tree
Showing 9 changed files with 1,899 additions and 2,142 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ vet:
mocks:
mockgen -package mocks -destination go/mocks/filtering.go github.com/rode/grafeas-elasticsearch/go/v1beta1/storage/filtering Filterer
mockgen -package mocks -destination go/mocks/index.go github.com/rode/grafeas-elasticsearch/go/v1beta1/storage/esutil IndexManager
counterfeiter go/v1beta1/storage/esutil Client
mockgen -package mocks -destination go/mocks/orchestrator.go github.com/rode/grafeas-elasticsearch/go/v1beta1/storage/migration Orchestrator

test: fmtcheck vet
Expand Down
14 changes: 14 additions & 0 deletions go/mocks/index.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/v1beta1/main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func main() {
migrator := migration.NewEsMigrator(logger.Named("EsMigrator"), esClient, indexManager)
migrationOrchestrator := migration.NewEsMigrationOrchestrator(logger.Named("EsMigrationOrchestrator"), migrator)

return storage.NewElasticsearchStorage(logger.Named("ElasticsearchStore"), esClient, filtering.NewFilterer(), c, indexManager, migrationOrchestrator), nil
return storage.NewElasticsearchStorage(logger.Named("ElasticsearchStore"), esutil.NewClient(logger, esClient), filtering.NewFilterer(), c, indexManager, migrationOrchestrator), nil
}, logger)

err = grafeasStorage.RegisterStorageTypeProvider("elasticsearch", registerStorageTypeProvider)
Expand Down
Loading

0 comments on commit 5c2d664

Please sign in to comment.