Documentation
¶
Index ¶
- type OriginFetchCache
- func (c *OriginFetchCache) MarkBranchesSuccess(commonDir string, branches []string)
- func (c *OriginFetchCache) MarkFullSuccess(commonDir string)
- func (c *OriginFetchCache) NeedsFullFetch(commonDir string, ttl time.Duration, fresh bool) bool
- func (c *OriginFetchCache) SetNow(now func() time.Time)
- func (c *OriginFetchCache) StaleBranches(commonDir string, ttl time.Duration, branches []string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OriginFetchCache ¶
type OriginFetchCache struct {
// contains filtered or unexported fields
}
OriginFetchCache TTL-gates full origin fetches by common git dir.
func NewOriginFetchCache ¶
func NewOriginFetchCache() *OriginFetchCache
NewOriginFetchCache returns an empty fetch TTL cache.
func (*OriginFetchCache) MarkBranchesSuccess ¶
func (c *OriginFetchCache) MarkBranchesSuccess(commonDir string, branches []string)
MarkBranchesSuccess records a successful targeted fetch.
func (*OriginFetchCache) MarkFullSuccess ¶
func (c *OriginFetchCache) MarkFullSuccess(commonDir string)
MarkFullSuccess records a successful full prune fetch.
func (*OriginFetchCache) NeedsFullFetch ¶
NeedsFullFetch reports whether a full git fetch --prune origin is required.
func (*OriginFetchCache) SetNow ¶
func (c *OriginFetchCache) SetNow(now func() time.Time)
SetNow injects a clock for tests.
func (*OriginFetchCache) StaleBranches ¶
func (c *OriginFetchCache) StaleBranches(commonDir string, ttl time.Duration, branches []string) []string
StaleBranches returns branches needing targeted refresh while full TTL is warm.
Click to show internal directories.
Click to hide internal directories.