packagestate

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package packagestate stores package-owned, per-file append-only state beside content.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirStore

type DirStore interface {
	Append(key string, record []byte) error
	Records(key string) iter.Seq2[[]byte, error]
	Replace(key string, records [][]byte) error
	Remove(key string) error
	Move(key string, to DirStore, toKey string) error
	RewriteMove(key string, to DirStore, toKey string, rewrite func([]byte) ([]byte, error)) error
}

type HostMapper

type HostMapper interface {
	HostDir(vfsDir string) (string, bool)
}

type Store

type Store interface {
	Dir(context.Context, string) (DirStore, error)
}

func Open

func Open(mapper HostMapper, pkg string) Store

Open scopes a store to one package. Uppercase letters use Go module-cache escaping (Github.com/X becomes !github.com/!x).

Jump to

Keyboard shortcuts

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