Skip to content

Commit

Permalink
remove createLicensePoller from setup contract
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Jun 30, 2021
1 parent 47f2c90 commit ceeb62d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
5 changes: 0 additions & 5 deletions x-pack/plugins/licensing/server/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,9 @@ const createSetupMock = (): jest.Mocked<LicensingPluginSetup> => {
const mock = {
license$: new BehaviorSubject(license),
refresh: jest.fn(),
createLicensePoller: jest.fn(),
featureUsage: featureUsageMock.createSetup(),
};
mock.refresh.mockResolvedValue(license);
mock.createLicensePoller.mockReturnValue({
license$: mock.license$,
refresh: mock.refresh,
});

return mock;
};
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/licensing/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ export class LicensingPlugin implements Plugin<LicensingPluginSetup, LicensingPl
return {
refresh,
license$,
createLicensePoller: this.createLicensePoller.bind(this),
featureUsage: featureUsageSetup,
};
}
Expand Down
10 changes: 0 additions & 10 deletions x-pack/plugins/licensing/server/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,6 @@ export interface LicensingPluginSetup {
*/
refresh(): Promise<ILicense>;

/**
* Creates a license poller to retrieve a license data with.
* Allows a plugin to configure a cluster to retrieve data from at
* given polling frequency.
* @deprecated in favour of the counterpart provided from start contract
*/
createLicensePoller: (
clusterClient: IClusterClient,
pollingFrequency: number
) => { license$: Observable<ILicense>; refresh(): Promise<ILicense> };
/**
* APIs to register licensed feature usage.
*/
Expand Down

0 comments on commit ceeb62d

Please sign in to comment.