Documentation
¶
Index ¶
Constants ¶
View Source
const (
// ErrReasonLayerNotFound 未找到层错误
ErrReasonLayerNotFound = "LayerNotFound"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Layer ¶
type Layer interface { // ID 返回层 ID ID() uid.UID // DiffDir 返回 diff 目录路径 DiffDir() string // Save 将相关信息持久化 Save() error }
Layer 层
type LayerManager ¶
type LayerManager interface { // Create 创建一个层 Create(ctx context.Context) (Layer, error) // Get 通过层 ID 获取层 Get(ctx context.Context, id uid.UID) (Layer, error) // List 列出所有层 List(ctx context.Context) ([]Layer, error) // Delete 通过层 ID 删除指定层 Delete(ctx context.Context, id uid.UID) (Layer, error) }
LayerManager 层管理器
func NewLayerManager ¶
func NewLayerManager(layersDataRoot string) LayerManager
NewLayerManager 创建一个 LayerManager
Click to show internal directories.
Click to hide internal directories.