Documentation
¶
Overview ¶
Package snapshot reads registries straight from git objects and caches exported skills by tree id: a tree never changes, so each skill version is exported once, and unchanged skills cost nothing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Snapshot ¶
type Snapshot struct {
Commit string
Registry *registry.Registry
// contains filtered or unexported fields
}
Snapshot is a registry as of one commit.
type Store ¶
Store caches exported skills under Dir/<tree id>.
func (*Store) Export ¶
Export makes sure the wanted trees are in the cache and returns the directory holding each, or why it cannot. Missing trees are exported together (see gitx.ExportTrees). A tree rejected by the export limits is remembered and not tried again: trees never change.
func (*Store) Prune ¶
Prune removes every cached skill except keep. Each one is renamed aside before being deleted, so an interrupted prune never leaves a partial tree that would pass for a complete one. Once ctx is done, the rest is left to the next sync.