mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
* fix master build (#2639) * feat: Change ts to use rsync Chore: Update the ts to use types over interface * feat: Get the rust and the js to do a backup * Wip: Got the backup working? * fix permissions * remove trixie list * update tokio to fix timer bug * fix error handling on backup * wip * remove idmap * run restore before init, and init with own version on restore --------- Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com> Co-authored-by: Aiden McClelland <me@drbonez.dev>
34 lines
971 B
TypeScript
34 lines
971 B
TypeScript
import { types as T } from "@start9labs/start-sdk"
|
|
import { JsonPath } from "../Models/JsonPath"
|
|
import { RpcResult } from "../Adapters/RpcListener"
|
|
import { hostSystemStartOs } from "../Adapters/HostSystemStartOs"
|
|
export type ExecuteResult =
|
|
| { ok: unknown }
|
|
| { err: { code: number; message: string } }
|
|
export type System = {
|
|
// init(effects: Effects): Promise<void>
|
|
// exit(effects: Effects): Promise<void>
|
|
// start(effects: Effects): Promise<void>
|
|
// stop(effects: Effects, options: { timeout: number, signal?: number }): Promise<void>
|
|
|
|
execute(
|
|
effectCreator: ReturnType<typeof hostSystemStartOs>,
|
|
options: {
|
|
id: string
|
|
procedure: JsonPath
|
|
input: unknown
|
|
timeout?: number
|
|
},
|
|
): Promise<RpcResult>
|
|
// sandbox(
|
|
// effects: Effects,
|
|
// options: {
|
|
// procedure: JsonPath
|
|
// input: unknown
|
|
// timeout?: number
|
|
// },
|
|
// ): Promise<unknown>
|
|
|
|
exit(effects: T.Effects): Promise<void>
|
|
}
|