Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsCachedError ¶
IsCachedError returns true if the given error is a CachedError.
Types ¶
type CachedError ¶
type CachedError struct {
// contains filtered or unexported fields
}
CachedError
type CacherImpl ¶
type CacherImpl struct {
// contains filtered or unexported fields
}
CacherImpl is a struct which handles insertion of data for RepoStates into various caches used by Task Scheduler. It ensures that we only sync to a given RepoState once (barring transient errors).
func New ¶
func New(s *syncer.Syncer, tcc task_cfg_cache.TaskCfgCache, rbeCas cas.CAS) *CacherImpl
New creates a Cacher instance.
func (*CacherImpl) GetOrCacheRepoState ¶
func (c *CacherImpl) GetOrCacheRepoState(ctx context.Context, rs types.RepoState) (*specs.TasksCfg, error)
GetOrCacheRepoState returns the cached value(s) for the given RepoState, performing the sync to obtain and insert the value(s) into the cache(s) if necessary.
Click to show internal directories.
Click to hide internal directories.