layers

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

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 层

func NewLayer

func NewLayer(id uid.UID, layerDataRoot string) Layer

NewLayer 创建一个 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL