mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
19 lines
457 B
TypeScript
19 lines
457 B
TypeScript
import { Effects } from '../Effects'
|
|
import { PackageId } from '../osBindings'
|
|
import { Watchable } from './Watchable'
|
|
|
|
export class GetContainerIp extends Watchable<string> {
|
|
protected readonly label = 'GetContainerIp'
|
|
|
|
constructor(
|
|
effects: Effects,
|
|
readonly opts: { packageId?: PackageId } = {},
|
|
) {
|
|
super(effects)
|
|
}
|
|
|
|
protected fetch(callback?: () => void) {
|
|
return this.effects.getContainerIp({ ...this.opts, callback })
|
|
}
|
|
}
|