disk

package
v0.1.3 Latest Latest
Warning

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

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

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