snapshot

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 21 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSnapshotName

func GenerateSnapshotName(name string) (string, error)

GenerateSnapshotName generates a random snapshot name.

Types

type OCIWriter

type OCIWriter struct {
	Client client.Client
	Cache  cache.Cache
	Scheme *runtime.Scheme
}

OCIWriter writes snapshot data into the cluster-local OCI cache.

func NewOCIWriter

func NewOCIWriter(client client.Client, cache cache.Cache, scheme *runtime.Scheme) *OCIWriter

NewOCIWriter creates a new OCI cache writer.

func (*OCIWriter) Write

func (w *OCIWriter) Write(
	ctx context.Context,
	owner v1alpha1.SnapshotWriter,
	sourceDir string,
	identity ocmmetav1.Identity,
) (_ string, _ int64, err error)

type Writer

type Writer interface {
	Write(ctx context.Context, owner v1alpha1.SnapshotWriter, sourceDir string, identity ocmmetav1.Identity) (string, int64, error)
}

Writer creates a snapshot using an artifact path as location for the snapshot data.

Jump to

Keyboard shortcuts

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