Help us shape the future of Go! Take the 2026 Go Developer Survey

cache

package
v0.3.2-alpha Latest Latest
Warning

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

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

Documentation

Overview

Package cache stores content-addressed analysis artifacts on disk.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SymbolSubgraphHash

func SymbolSubgraphHash(graph astgraph.Graph, symbolIDs []string) string

SymbolSubgraphHash returns a stable SHA-256 digest of selected nodes and their edges.

Types

type Cache

type Cache struct{ Root string }

Cache is a filesystem-backed content-addressable cache.

func (Cache) Get

func (c Cache) Get(key string) (TestOutcome, bool, error)

Get reads a cached outcome, returning hit=false when the key has no entry.

func (Cache) Put

func (c Cache) Put(key string, out TestOutcome) error

Put atomically stores a test outcome under its content key.

type TestOutcome

type TestOutcome struct {
	Passed         bool   `json:"passed"`
	DurationMillis int64  `json:"duration_ms,omitempty"`
	OutputHash     string `json:"output_hash,omitempty"`
}

TestOutcome is the cached result for one test target.

Jump to

Keyboard shortcuts

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