disk

package
v0.0.0-...-e0658cb Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactReader

type ArtifactReader struct {
	// contains filtered or unexported fields
}

func NewArtifactReader

func NewArtifactReader(blobsRoot *os.Root, digest string) (*ArtifactReader, error)

func (*ArtifactReader) Close

func (a *ArtifactReader) Close() error

Close implements libraries.DigestReadCloser.

func (*ArtifactReader) Digest

func (a *ArtifactReader) Digest() string

Digest implements libraries.DigestReadCloser.

func (*ArtifactReader) Read

func (a *ArtifactReader) Read(p []byte) (n int, err error)

Read implements libraries.DigestReadCloser.

type ArtifactWriter

type ArtifactWriter struct {
	// contains filtered or unexported fields
}

func NewArtifactWriter

func NewArtifactWriter(snapshotRoot *os.Root, blobsRoot *os.Root, name string) (*ArtifactWriter, error)

func (*ArtifactWriter) Close

func (a *ArtifactWriter) Close() error

Close implements libraries.DigestWriteCloser.

func (*ArtifactWriter) Digest

func (a *ArtifactWriter) Digest() string

Digest implements libraries.DigestWriteCloser.

func (*ArtifactWriter) Write

func (a *ArtifactWriter) Write(p []byte) (n int, err error)

Write implements libraries.DigestWriteCloser.

type Library

type Library struct {
	// contains filtered or unexported fields
}

func NewLibrary

func NewLibrary(basePath string) (*Library, error)

func (*Library) Close

func (l *Library) Close() error

func (*Library) GetOrigins

func (d *Library) GetOrigins(ctx context.Context) ([]string, error)

GetOrigins implements LibraryReader.

func (*Library) GetSnapshots

func (d *Library) GetSnapshots(ctx context.Context, origin string) ([]string, error)

GetSnapshots implements LibraryReader.

func (*Library) ReadArtifact

func (d *Library) ReadArtifact(ctx context.Context, digest string) (libraries.ArtifactReader, error)

ReadArtifact implements LibraryReader.

func (*Library) ReadSnapshot

func (d *Library) ReadSnapshot(ctx context.Context, origin string, id string) (libraries.SnapshotReader, error)

ReadSnapshot implements LibraryReader.

func (*Library) WriteSnapshot

func (d *Library) WriteSnapshot(ctx context.Context, origin string, id string) (libraries.SnapshotWriter, error)

WriteSnapshot implements LibraryWriter.

type SnapshotReader

type SnapshotReader struct {
	// contains filtered or unexported fields
}

func NewSnapshotReader

func NewSnapshotReader(snapshotsRoot *os.Root, blobsRoot *os.Root, origin string, id string) (*SnapshotReader, error)

func (*SnapshotReader) Close

func (s *SnapshotReader) Close() error

Close implements SnapshotReader.

func (*SnapshotReader) Index

Index implements SnapshotReader.

func (*SnapshotReader) NextArtifactReader

func (s *SnapshotReader) NextArtifactReader(ctx context.Context, digest string) (libraries.ArtifactReader, error)

NextArtifactReader implements SnapshotReader.

type SnapshotWriter

type SnapshotWriter struct {
	// contains filtered or unexported fields
}

func NewSnapshotWriter

func NewSnapshotWriter(snapshotsRoot *os.Root, blobsRoot *os.Root, origin string, id string) (*SnapshotWriter, error)

func (*SnapshotWriter) Close

func (d *SnapshotWriter) Close() error

func (*SnapshotWriter) NextArtifactWriter

func (d *SnapshotWriter) NextArtifactWriter(ctx context.Context, name string) (libraries.ArtifactWriter, error)

NextArtifactWriter implements SnapshotWriter.

func (*SnapshotWriter) WriteArtifact

func (d *SnapshotWriter) WriteArtifact(ctx context.Context, name string, data []byte) (int64, string, error)

WriteArtifact implements SnapshotWriter.

func (*SnapshotWriter) WriteArtifactManifest

func (d *SnapshotWriter) WriteArtifactManifest(ctx context.Context, manifest libraries.ArtifactManifest) error

WriteArtifactManifest implements SnapshotWriter.

Jump to

Keyboard shortcuts

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