Update go dependencies (#32389)

This commit is contained in:
wxiaoguang 2024-10-31 20:05:54 +08:00 committed by GitHub
parent 9914c9ab08
commit 5e6523aa57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 339 additions and 361 deletions

View file

@ -12,7 +12,7 @@ import (
// Indexer represents a basic meilisearch indexer implementation
type Indexer struct {
Client *meilisearch.Client
Client meilisearch.ServiceManager
url, apiKey string
indexName string
@ -40,11 +40,7 @@ func (i *Indexer) Init(_ context.Context) (bool, error) {
return false, fmt.Errorf("indexer is already initialized")
}
i.Client = meilisearch.NewClient(meilisearch.ClientConfig{
Host: i.url,
APIKey: i.apiKey,
})
i.Client = meilisearch.New(i.url, meilisearch.WithAPIKey(i.apiKey))
_, err := i.Client.GetIndex(i.VersionedIndexName())
if err == nil {
return true, nil