|
1 | | -import { clearStateHandler } from './clear-state.ts'; |
2 | | -import { executeDBQueryHandler } from './execute-db-query.ts'; |
3 | | -import { getStatusHandler } from './get-status.ts'; |
4 | | -import { launchVatHandler } from './launch-vat.ts'; |
5 | | -import { reloadConfigHandler } from './reload-config.ts'; |
6 | | -import { restartVatHandler } from './restart-vat.ts'; |
7 | | -import { sendVatCommandHandler } from './send-vat-command.ts'; |
8 | | -import { terminateAllVatsHandler } from './terminate-all-vats.ts'; |
9 | | -import { terminateVatHandler } from './terminate-vat.ts'; |
10 | | -import { updateClusterConfigHandler } from './update-cluster-config.ts'; |
| 1 | +import { clearStateHandler, clearStateSpec } from './clear-state.ts'; |
| 2 | +import { |
| 3 | + executeDBQueryHandler, |
| 4 | + executeDBQuerySpec, |
| 5 | +} from './execute-db-query.ts'; |
| 6 | +import { getStatusHandler, getStatusSpec } from './get-status.ts'; |
| 7 | +import { launchVatHandler, launchVatSpec } from './launch-vat.ts'; |
| 8 | +import { reloadConfigHandler, reloadConfigSpec } from './reload-config.ts'; |
| 9 | +import { restartVatHandler, restartVatSpec } from './restart-vat.ts'; |
| 10 | +import { |
| 11 | + sendVatCommandHandler, |
| 12 | + sendVatCommandSpec, |
| 13 | +} from './send-vat-command.ts'; |
| 14 | +import { |
| 15 | + terminateAllVatsHandler, |
| 16 | + terminateAllVatsSpec, |
| 17 | +} from './terminate-all-vats.ts'; |
| 18 | +import { terminateVatHandler, terminateVatSpec } from './terminate-vat.ts'; |
| 19 | +import { |
| 20 | + updateClusterConfigHandler, |
| 21 | + updateClusterConfigSpec, |
| 22 | +} from './update-cluster-config.ts'; |
11 | 23 |
|
| 24 | +/** |
| 25 | + * Call-ee side handlers for the kernel control methods. |
| 26 | + */ |
12 | 27 | export const handlers = { |
13 | | - getStatus: getStatusHandler, |
14 | 28 | clearState: clearStateHandler, |
15 | | - sendVatCommand: sendVatCommandHandler, |
16 | 29 | executeDBQuery: executeDBQueryHandler, |
| 30 | + getStatus: getStatusHandler, |
17 | 31 | launchVat: launchVatHandler, |
18 | 32 | reload: reloadConfigHandler, |
19 | 33 | restartVat: restartVatHandler, |
20 | | - terminateVat: terminateVatHandler, |
| 34 | + sendVatCommand: sendVatCommandHandler, |
21 | 35 | terminateAllVats: terminateAllVatsHandler, |
| 36 | + terminateVat: terminateVatHandler, |
22 | 37 | updateClusterConfig: updateClusterConfigHandler, |
23 | 38 | } as const; |
24 | 39 |
|
25 | | -export type KernelControlMethod = |
26 | | - (typeof handlers)[keyof typeof handlers]['method']; |
| 40 | +/** |
| 41 | + * Call-er side method specs for the kernel control methods. |
| 42 | + */ |
| 43 | +export const methodSpecs = { |
| 44 | + clearState: clearStateSpec, |
| 45 | + executeDBQuery: executeDBQuerySpec, |
| 46 | + getStatus: getStatusSpec, |
| 47 | + launchVat: launchVatSpec, |
| 48 | + reload: reloadConfigSpec, |
| 49 | + restartVat: restartVatSpec, |
| 50 | + sendVatCommand: sendVatCommandSpec, |
| 51 | + terminateAllVats: terminateAllVatsSpec, |
| 52 | + terminateVat: terminateVatSpec, |
| 53 | + updateClusterConfig: updateClusterConfigSpec, |
| 54 | +} as const; |
| 55 | + |
| 56 | +type Handlers = (typeof handlers)[keyof typeof handlers]; |
| 57 | + |
| 58 | +export type KernelControlMethod = Handlers['method']; |
| 59 | + |
| 60 | +export type { KernelStatus } from './get-status.ts'; |
0 commit comments