package snapshot

import "github.com/containerd/nydus-snapshotter/pkg/snapshot"

Index

Functions

func GetSnapshot

func GetSnapshot(ctx context.Context, ms *storage.MetaStore, key string) (*storage.Snapshot, error)

func GetSnapshotInfo

func GetSnapshotInfo(ctx context.Context, ms *storage.MetaStore, key string) (string, snapshots.Info, snapshots.Usage, error)

func IterateParentSnapshots

func IterateParentSnapshots(ctx context.Context, ms *storage.MetaStore, key string, fn WalkFunc) (string, snapshots.Info, error)

Iterate all the parents of a snapshot specified by `key` Stop the iteration once callback `fn` is invoked successfully and return current iterated snapshot

func UpdateSnapshotInfo

func UpdateSnapshotInfo(ctx context.Context, ms *storage.MetaStore, info snapshots.Info, fieldPaths ...string) (snapshots.Info, error)

Types

type WalkFunc

type WalkFunc = func(id string, info snapshots.Info) bool

Source Files

storage.go

Version
v0.15.1 (latest)
Published
Jan 26, 2025
Platform
linux/amd64
Imports
6 packages
Last checked
1 week ago

Tools for package owners.