local

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store implements store.ObjectStore for the local filesystem.

func New

func New(basePath string) (*Store, error)

func (*Store) Delete

func (s *Store) Delete(_ context.Context, key string) error

func (*Store) Exists

func (s *Store) Exists(_ context.Context, key string) (bool, error)

func (*Store) Flush

func (s *Store) Flush(ctx context.Context) error

func (*Store) Get

func (s *Store) Get(_ context.Context, key string) ([]byte, error)

func (*Store) GetRange

func (s *Store) GetRange(_ context.Context, key string, offset, length int64) ([]byte, error)

GetRange implements RangeGetter, letting callers read a packfile footer without loading the whole object.

func (*Store) List

func (s *Store) List(_ context.Context, prefix string) ([]string, error)

List returns all keys matching the given prefix. When a prefix is provided the walk is scoped to just that subdirectory for efficiency.

func (*Store) Put

func (s *Store) Put(_ context.Context, key string, data []byte) error

func (*Store) Size

func (s *Store) Size(_ context.Context, key string) (int64, error)

func (*Store) TotalSize

func (s *Store) TotalSize(_ context.Context) (int64, error)

Jump to

Keyboard shortcuts

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