Documentation
¶
Index ¶
Constants ¶
View Source
const CacheMiss = Error("Item not found in cache")
CacheMiss indicates the cache did not contain a match
View Source
const WriteOnly = "WRITE_ONLY"
Variables ¶
This section is empty.
Functions ¶
func HashString ¶
HashString returns the SHA1 hash of a string
func NewMiddleware ¶
func NewMiddleware(s store.Store, user, mode string) project.RunnerBuilder
NewMiddleware returns caching middleware
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache used to determine rule keys
func (*Cache) Key ¶
Key returns a struct of information that uniquely identifies the Rule's inputs and configuration. This used to store Rule outputs in the cache.
type Key ¶
type Key struct {
Project string `json:"project"`
Component string `json:"component"`
Rule string `json:"rule"`
Image string `json:"image"`
OutputCount int `json:"output_count"`
Inputs []*Entry `json:"inputs"`
Deps []*Entry `json:"deps"`
Env []*Entry `json:"env"`
Toolchain []*Entry `json:"toolchain"`
Version string `json:"version"`
Commands []string `json:"commands"`
// contains filtered or unexported fields
}
Key contains information used to build a key
Click to show internal directories.
Click to hide internal directories.