mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-30 20:24:47 +00:00
feat: add effect for creating overlay
This commit is contained in:
14
lib/types.ts
14
lib/types.ts
@@ -5,8 +5,6 @@ import { PortOptions } from "./interfaces/Host"
|
|||||||
import { UrlString } from "./util/getNetworkInterface"
|
import { UrlString } from "./util/getNetworkInterface"
|
||||||
import { NetworkInterfaceType } from "./util/utils"
|
import { NetworkInterfaceType } from "./util/utils"
|
||||||
|
|
||||||
export type Signals = "SIGINT" | "SIGTERM" | "SIGKILL" | "SIGHUP"
|
|
||||||
|
|
||||||
export type ExportedAction = (options: {
|
export type ExportedAction = (options: {
|
||||||
effects: Effects
|
effects: Effects
|
||||||
input?: Record<string, unknown>
|
input?: Record<string, unknown>
|
||||||
@@ -130,7 +128,7 @@ export type DaemonReceipt = {
|
|||||||
}
|
}
|
||||||
export type Daemon = {
|
export type Daemon = {
|
||||||
wait(): Promise<string>
|
wait(): Promise<string>
|
||||||
term(options?: { signal?: Signals; timeout?: number }): Promise<void>
|
term(): Promise<void>
|
||||||
[DaemonProof]: never
|
[DaemonProof]: never
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,7 +148,7 @@ export type CommandType<A extends string> =
|
|||||||
|
|
||||||
export type DaemonReturned = {
|
export type DaemonReturned = {
|
||||||
wait(): Promise<string>
|
wait(): Promise<string>
|
||||||
term(options?: { signal?: Signals; timeout?: number }): Promise<void>
|
term(): Promise<void>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ActionMetadata = {
|
export type ActionMetadata = {
|
||||||
@@ -224,10 +222,14 @@ export type ExposeUiPaths<Store> = Array<{
|
|||||||
export type Effects = {
|
export type Effects = {
|
||||||
executeAction<Input>(opts: {
|
executeAction<Input>(opts: {
|
||||||
serviceId?: string
|
serviceId?: string
|
||||||
actionId: string
|
|
||||||
input: Input
|
input: Input
|
||||||
}): Promise<unknown>
|
}): Promise<unknown>
|
||||||
|
|
||||||
|
/** The idea is that we can mount the imageId, and it returns us the location of the mount. */
|
||||||
|
createOverlayImage(options: { imageId: string }): Promise<String>
|
||||||
|
/** Sandbox mode lets us read but not write */
|
||||||
|
is_sandboxed(): Promise<boolean>
|
||||||
|
|
||||||
/** Removes all network bindings */
|
/** Removes all network bindings */
|
||||||
clearBindings(): Promise<void>
|
clearBindings(): Promise<void>
|
||||||
/** Creates a host connected to the specified port with the provided options */
|
/** Creates a host connected to the specified port with the provided options */
|
||||||
@@ -397,8 +399,6 @@ export type Effects = {
|
|||||||
message?: string
|
message?: string
|
||||||
}): Promise<void>
|
}): Promise<void>
|
||||||
|
|
||||||
setMainStatus(o: { status: "running" | "stopped" }): Promise<void>
|
|
||||||
|
|
||||||
/** Set the dependencies of what the service needs, usually ran during the set config as a best practice */
|
/** Set the dependencies of what the service needs, usually ran during the set config as a best practice */
|
||||||
setDependencies(dependencies: Dependencies): Promise<DependenciesReceipt>
|
setDependencies(dependencies: Dependencies): Promise<DependenciesReceipt>
|
||||||
/** Exists could be useful during the runtime to know if some service exists, option dep */
|
/** Exists could be useful during the runtime to know if some service exists, option dep */
|
||||||
|
|||||||
Reference in New Issue
Block a user