Documentation
¶
Index ¶
- func StartPruner(ctx context.Context, store *Store, interval time.Duration)
- type Config
- type Entry
- type HashInput
- type Store
- func (s *Store) Get(hash string) (*Entry, bool, error)
- func (s *Store) Invalidate(jobID uuid.UUID, taskName string) error
- func (s *Store) InvalidateJob(jobID uuid.UUID) error
- func (s *Store) ListByJob(jobID uuid.UUID) ([]Entry, error)
- func (s *Store) Prune() (int, error)
- func (s *Store) Put(entry *Entry) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
Config holds cache configuration from environment.
func ConfigFromEnv ¶
func ConfigFromEnv() Config
ConfigFromEnv reads cache configuration from environment variables.
type Entry ¶
type Entry struct {
Hash string
JobID uuid.UUID
TaskName string
Result string
Output map[string]string
BranchSelections []string
RunID uuid.UUID
TaskRunID uuid.UUID
CreatedAt time.Time
ExpiresAt *time.Time
}
Entry represents a cached task result.
type HashInput ¶
type HashInput struct {
JobAlias string
TaskName string
Image string
Command []string
Env map[string]string
WorkDir string
Mounts []container.Mount
PredecessorHashes []string
PredecessorOutputs map[string]map[string]string
RunParams map[string]string
CacheVersion int
}
HashInput contains all fields that contribute to a task's identity hash.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store provides cache operations backed by GORM.
func (*Store) Get ¶
Get retrieves a cache entry by hash. Returns nil, false, nil if not found or expired.
func (*Store) Invalidate ¶
Invalidate removes cache entries for a specific task.
func (*Store) InvalidateJob ¶
InvalidateJob removes all cache entries for a job.
Click to show internal directories.
Click to hide internal directories.