跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

浏览文件

manager.go

26 行 · 882 B历史下载
1// SPDX-FileCopyrightText: Copyright The Lima Authors
2// SPDX-License-Identifier: Apache-2.0
3
4package imgutil
5
6import (
7 "context"
8 "os"
9
10 "github.com/lima-vm/go-qcow2reader/image"
11)
12
13// ImageDiskManager defines the common operations for disk image utilities.
14type ImageDiskManager interface {
15 // CreateDisk creates a new disk image with the specified size.
16 CreateDisk(ctx context.Context, disk string, size int64) error
17
18 // ResizeDisk resizes an existing disk image to the specified size.
19 ResizeDisk(ctx context.Context, disk string, size int64) error
20
21 // Convert converts a disk image to the specified format.
22 Convert(ctx context.Context, imageType image.Type, source, dest string, size *int64, allowSourceWithBackingFile bool) error
23
24 // MakeSparse makes a file sparse, starting from the specified offset.
25 MakeSparse(ctx context.Context, f *os.File, offset int64) error
26}