cache

package
v0.0.0-...-99b6f83 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntrySummary

type EntrySummary struct {
	Namespace string `json:"namespace,omitempty"`
	Task      string `json:"task"`
	Key       string `json:"key"`
	CreatedAt string `json:"createdAt"`
}

type Manifest

type Manifest struct {
	Version       int     `json:"version"`
	Task          string  `json:"task"`
	Key           string  `json:"key"`
	CreatedAt     string  `json:"createdAt"`
	Outputs       Outputs `json:"outputs"`
	InputsSummary Summary `json:"inputsSummary"`
}

type Outputs

type Outputs struct {
	Files []string `json:"files"`
	Dirs  []string `json:"dirs"`
}

type Store

type Store struct {
	Root      string
	Namespace string
}

func New

func New(root string) *Store

func NewNamespaced

func NewNamespaced(root, namespace string) *Store

func (*Store) EntriesRoot

func (s *Store) EntriesRoot() string

func (*Store) EntryDir

func (s *Store) EntryDir(task, key string) string

func (*Store) GC

func (s *Store) GC(keepPerTask int) (int, error)

func (*Store) Invalidate

func (s *Store) Invalidate(task string) error

func (*Store) List

func (s *Store) List() ([]EntrySummary, error)

func (*Store) Load

func (s *Store) Load(task, key string) (*Manifest, bool, error)

func (*Store) Restore

func (s *Store) Restore(worktree string, taskName, key string) (bool, error)

func (*Store) RestoreContext

func (s *Store) RestoreContext(ctx context.Context, worktree string, taskName, key string, onProgress func(fsutil.CopyProgress)) (bool, error)

func (*Store) Snapshot

func (s *Store) Snapshot(worktree string, task project.Task, key string) (*Manifest, error)

func (*Store) SnapshotContext

func (s *Store) SnapshotContext(ctx context.Context, worktree string, task project.Task, key string, onProgress func(fsutil.CopyProgress)) (*Manifest, error)

type Summary

type Summary struct {
	FileCount int      `json:"fileCount"`
	DirCount  int      `json:"dirCount"`
	Env       []string `json:"env"`
}

Jump to

Keyboard shortcuts

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