Versions in this module Expand all Collapse all v0 v0.1.1 Nov 23, 2026 Changes in this version type Resources + func (r *Resources) CompleteInvalidated(key string, generation uint64, now time.Time, jitter float64, ...) bool v0.1.0 Nov 14, 2026 Changes in this version + const UpdateIntervalKey + var Never = time.Date(9999, 1, 1, 0, 0, 0, 0, time.UTC) + func Interval(settings map[string]any, fallback time.Duration) time.Duration + func Next(now time.Time, interval time.Duration) time.Time + func RetryDelay(interval time.Duration, failures int, jitter float64) time.Duration + type PollState struct + Available bool + Failures int + LastValue any + Next time.Time + ObservedAt time.Time + Stale bool + func (p *PollState) Complete(value any, failed bool, now time.Time, interval time.Duration, jitter float64, ...) + type RefreshPolicy struct + DefaultMS int64 + MaximumMS int64 + MinimumMS int64 + func (p RefreshPolicy) Resolve(settings map[string]any) (time.Duration, error) + type Resources struct + States map[string]PollState + func NewResources() *Resources + func (r *Resources) Begin(key string) (uint64, error) + func (r *Resources) Complete(key string, generation uint64, value any, failed bool, now time.Time, ...) bool + func (r *Resources) Deadline(key string) time.Time + func (r *Resources) Due(now time.Time) []string + func (r *Resources) Snapshot(context string) (PollState, bool) + func (r *Resources) Unwatch(context string) + func (r *Resources) Watch(context, key string, interval time.Duration) error