add callback for getContainerIp (#2851)

* add callback for getContainerIp

* register callback before retrieving info

* version bump; only use backports for linux
This commit is contained in:
Aiden McClelland
2025-03-20 15:54:05 -06:00
committed by GitHub
parent 05162ca350
commit 9e63f3f7c6
69 changed files with 592 additions and 262 deletions

View File

@@ -130,7 +130,10 @@ export type Effects = {
callback?: () => void
}): Promise<Host | null>
/** Returns the IP address of the container */
getContainerIp(): Promise<string>
getContainerIp(options: {
packageId?: PackageId
callback?: () => void
}): Promise<string>
/** Returns the IP address of StartOS */
getOsIp(): Promise<string>
// interface

View File

@@ -0,0 +1,8 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { CallbackId } from "./CallbackId"
import type { PackageId } from "./PackageId"
export type GetContainerIpParams = {
packageId?: PackageId
callback?: CallbackId
}

View File

@@ -80,6 +80,7 @@ export { ForgetInterfaceParams } from "./ForgetInterfaceParams"
export { FullIndex } from "./FullIndex"
export { FullProgress } from "./FullProgress"
export { GetActionInputParams } from "./GetActionInputParams"
export { GetContainerIpParams } from "./GetContainerIpParams"
export { GetHostInfoParams } from "./GetHostInfoParams"
export { GetOsAssetParams } from "./GetOsAssetParams"
export { GetOsVersionParams } from "./GetOsVersionParams"

View File

@@ -7,6 +7,7 @@ import {
ClearCallbacksParams,
ClearServiceInterfacesParams,
GetActionInputParams,
GetContainerIpParams,
GetStatusParams,
RequestActionParams,
RunActionParams,
@@ -77,7 +78,7 @@ describe("startosTypeValidation ", () => {
set: {} as any, // as SetStoreParams,
},
getSystemSmtp: {} as WithCallback<GetSystemSmtpParams>,
getContainerIp: undefined,
getContainerIp: {} as WithCallback<GetContainerIpParams>,
getOsIp: undefined,
getServicePortForward: {} as GetServicePortForwardParams,
clearServiceInterfaces: {} as ClearServiceInterfacesParams,