modal-ts
    Preparing search index...

    Class Sandbox

    数秒で起動するModal上のセキュアで隔離されたコンテナ

    Index

    Constructors

    Properties

    sandboxId: string

    Accessors

    Methods

    • Returns void

      Sandboxとの接続を切断しローカルリソースを解放する(Sandbox自体はModal上で継続動作)

    • Returns Promise<Record<string, string>>

      タグのキーバリューマッピング

      Sandboxに設定されているタグを取得する

    • Mount an Image at a path in the Sandbox filesystem.

      Parameters

      • path: string

        The path where the directory should be mounted

      • Optionalimage: Image

        Optional Image to mount. If undefined, mounts an empty directory.

      Returns Promise<void>

    • Check if the Sandbox has finished running.

      Returns null if the Sandbox is still running, else returns the exit code.

      Returns Promise<number | null>

    • Parameters

      • tags: Record<string, string>

        タグのキーバリューマッピング

      Returns Promise<void>

      Sandboxにタグ(キーバリューペア)を設定する

    • Snapshots and creates a new Image from a directory in the running sandbox.

      Parameters

      • path: string

        The path of the directory to snapshot

      Returns Promise<Image>

      Promise that resolves to an Image

    • Snapshot the filesystem of the Sandbox.

      Returns an Image object which can be used to spawn a new Sandbox with the same filesystem.

      Parameters

      • timeoutMs: number = 55000

        Timeout for the snapshot operation in milliseconds

      Returns Promise<Image>

      Promise that resolves to an Image

    • Returns Promise<undefined>

      wait: trueの場合はexit code

      Sandboxを終了する

    • Parameters

      • params: { wait: true }

        オプションパラメータ(waitでexit codeを返す)

      Returns Promise<number>

      wait: trueの場合はexit code

      Sandboxを終了する

    • Parameters

      • timeoutMs: number = 50000

        タイムアウト(ミリ秒)

      Returns Promise<Record<number, Tunnel>>

      コンテナポートをキーとしたTunnelのマッピング

      SandboxのTunnelメタデータを取得する

      50000
      

      SandboxTimeoutError タイムアウト時

    • Returns Promise<number>

      exit code

      Sandboxの終了を待機してexit codeを返す

    • Parameters

      • timeoutMs: number = 300_000

        最大待機時間(ミリ秒)

      Returns Promise<void>

      readinessプローブが成功するまでブロック

      300000