import { ElasticsearchServiceStart , Logger , SavedObjectsClient , } from '../../../../../../src/core/server' ; import { LicensingPluginSetup } from '../../../../licensing/server' ; import { SecurityPluginStart } from '../../../../security/server' ; import { ReindexWorker } from '../../lib/reindexing' ; import { CredentialStore } from '../../lib/reindexing/credential_store' ; interface CreateReindexWorker { logger : Logger ; elasticsearchService : ElasticsearchServiceStart ; credentialStore : CredentialStore ; savedObjects : SavedObjectsClient ; licensing : LicensingPluginSetup ; security : SecurityPluginStart ; } export function createReindexWorker ( { logger , elasticsearchService , credentialStore , savedObjects , licensing , security , } ) { const esClient = elasticsearchService . client ; return ReindexWorker . create ( savedObjects , credentialStore , esClient , logger , licensing , security ) ; }