Skip to content

Commit

Permalink
[asset manager] move collectors outside of implicit collection dir (e…
Browse files Browse the repository at this point in the history
…lastic#162054)

## Summary

Moving asset collectors up a level since they can also be used without
periodic implicit collection wrapper
  • Loading branch information
klacabane committed Jul 19, 2023
1 parent d965cd5 commit 77a9c6a
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { Asset } from '../../../../common/types_api';
import { GetHostsOptionsInjected } from '.';
import { collectHosts } from '../../implicit_collection/collectors/hosts';
import { collectHosts } from '../../collectors/hosts';

export async function getHostsBySignals(
options: GetHostsOptionsInjected
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { estypes } from '@elastic/elasticsearch';
import { Asset } from '../../../../common/types_api';
import { Asset } from '../../../common/types_api';
import { CollectorOptions, QUERY_MAX_SIZE } from '.';
import { withSpan } from './helpers';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { estypes } from '@elastic/elasticsearch';
import { Asset } from '../../../../common/types_api';
import { Asset } from '../../../common/types_api';
import { CollectorOptions, QUERY_MAX_SIZE } from '.';
import { withSpan } from './helpers';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import { Transaction } from 'elastic-apm-node';
import { estypes } from '@elastic/elasticsearch';
import { ElasticsearchClient } from '@kbn/core/server';
import { AssetManagerConfig } from '../../../types';
import { Asset } from '../../../../common/types_api';
import { AssetManagerConfig } from '../../types';
import { Asset } from '../../../common/types_api';

export const QUERY_MAX_SIZE = 10000;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { estypes } from '@elastic/elasticsearch';
import { Asset } from '../../../../common/types_api';
import { Asset } from '../../../common/types_api';
import { CollectorOptions, QUERY_MAX_SIZE } from '.';
import { withSpan } from './helpers';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { estypes } from '@elastic/elasticsearch';
import { Asset } from '../../../../common/types_api';
import { Asset } from '../../../common/types_api';
import { CollectorOptions, QUERY_MAX_SIZE } from '.';
import { withSpan } from './helpers';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import expect from '@kbn/expect';
import { ElasticsearchClient, Logger } from '@kbn/core/server';
import { CollectorRunner } from './collector_runner';
import { CollectorOptions } from './collectors';
import { CollectorOptions } from '../collectors';
import { Asset } from '../../../common/types_api';
import { INDEX_DEFAULTS } from '../../types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

import apm from 'elastic-apm-node';
import { ImplicitCollectionOptions } from '.';
import { Collector, CollectorOptions, QUERY_MAX_SIZE } from './collectors';
import { Collector, CollectorOptions, QUERY_MAX_SIZE } from '../collectors';
import { Asset } from '../../../common/types_api';
import { withSpan } from './collectors/helpers';
import { withSpan } from '../collectors/helpers';

const TRANSACTION_TYPE = 'asset_manager-implicit_collection';
const transactionName = (collectorName: string) => `asset_manager-collector_${collectorName}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { ElasticsearchClient, Logger } from '@kbn/core/server';
import { AssetManagerConfig } from '../../types';

import { collectContainers, collectHosts, collectPods, collectServices } from './collectors';
import { collectContainers, collectHosts, collectPods, collectServices } from '../collectors';
import { CollectorRunner } from './collector_runner';

export interface ImplicitCollectionOptions {
Expand Down

0 comments on commit 77a9c6a

Please sign in to comment.