Add a best-effort accepted-artifact filesystem cache
This commit is contained in:
@@ -21,6 +21,15 @@ const (
|
||||
CacheRefresh CacheMode = "refresh"
|
||||
)
|
||||
|
||||
// ArtifactCache stores accepted artifact bytes under an opaque native message
|
||||
// hash. A nil lookup is a miss. Other lookup/write errors are diagnostic data,
|
||||
// not reasons to fail otherwise successful production. Callers own typed codec
|
||||
// and source-usability checks and must never store rejected or fallback output.
|
||||
type ArtifactCache interface {
|
||||
Lookup(context.Context, CacheMode, string) ([]byte, error)
|
||||
Store(context.Context, CacheMode, string, []byte) error
|
||||
}
|
||||
|
||||
// ProducerControls is resolved before execution; modules do not inherit settings.
|
||||
type ProducerControls struct {
|
||||
Mode ExecutionMode `json:"mode"`
|
||||
|
||||
Reference in New Issue
Block a user