Documentation
¶
Overview ¶
Package stepcache builds a StepCache from config: off (the default, never hits) or dir (one marker file per passed key under a directory), and derives the content-addressed key a step is cached under.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsOff ¶ added in v0.0.19
func IsOff(c interfaces.StepCache) bool
IsOff reports whether c is the off cache (or nil), so a caller can skip computing keys nothing will ever look up.
func Key ¶
Key is the hex SHA-256 of a step's inputs, its tool's version and its arguments. Each field is length-prefixed, so no two different field lists share a key.
func NewFromConfig ¶
func NewFromConfig(cfg Config) (interfaces.StepCache, error)
NewFromConfig builds the cache cfg.Kind selects. An unknown kind, or KindDir with no Dir, is CodeInvalidInput. It does no I/O.
Types ¶
Click to show internal directories.
Click to hide internal directories.