disk

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package disk stores immutable, digest-verified bytes under one filesystem root.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store confines content-addressed bytes to an owner-only directory.

func Open

func Open(path string) (*Store, error)

Open checks the storage directory before opening its confined root.

func OpenExisting

func OpenExisting(path string) (*Store, error)

OpenExisting opens a store for inspection without creating directories.

func (*Store) Close

func (s *Store) Close() error

Close releases the root directory descriptor.

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, digest string) error

Delete removes a blob; the caller must establish that no record references it.

func (*Store) Open

func (s *Store) Open(ctx context.Context, digest string) (io.ReadCloser, error)

Open verifies a regular blob against its digest before returning the bytes.

func (*Store) Put

func (s *Store) Put(ctx context.Context, r io.Reader, limit int64) (board.Blob, error)

Put publishes a bounded upload only after its bytes have reached disk.

func (*Store) Stat

func (s *Store) Stat(ctx context.Context, digest string) (board.Blob, error)

Stat returns size and modification time after verifying the blob.

func (*Store) Walk

func (s *Store) Walk(ctx context.Context, visit func(board.Blob) error) error

Walk visits published blobs, excluding temporary uploads.

Jump to

Keyboard shortcuts

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