1 | import { ISignal } from '@lumino/signaling';
|
2 | import { IManager as IBaseManager } from '../basemanager';
|
3 | import { ISpecModel, ISpecModels } from './restapi';
|
4 | export { ISpecModel, ISpecModels };
|
5 | /**
|
6 | * Object which manages kernel instances for a given base url.
|
7 | *
|
8 | * #### Notes
|
9 | * The manager is responsible for maintaining the state of kernel specs.
|
10 | */
|
11 | export interface IManager extends IBaseManager {
|
12 | /**
|
13 | * A signal emitted when the kernel specs change.
|
14 | */
|
15 | specsChanged: ISignal<IManager, ISpecModels>;
|
16 | /**
|
17 | * The kernel spec models.
|
18 | *
|
19 | * #### Notes
|
20 | * The value will be null until the manager is ready.
|
21 | */
|
22 | readonly specs: ISpecModels | null;
|
23 | /**
|
24 | * Force a refresh of the specs from the server.
|
25 | *
|
26 | * @returns A promise that resolves when the specs are fetched.
|
27 | *
|
28 | * #### Notes
|
29 | * This is intended to be called only in response to a user action,
|
30 | * since the manager maintains its internal state.
|
31 | */
|
32 | refreshSpecs(): Promise<void>;
|
33 | }
|