Documentation
¶
Index ¶
- func Score(relevance, temperature float64) float64
- type ColdHandler
- type Config
- type NodeStore
- type TickResult
- type Tracker
- func (t *Tracker) MarkNotified(ids []string)
- func (t *Tracker) RecordAccess(ctx context.Context, ids []string) error
- func (t *Tracker) Run(ctx context.Context, handler ColdHandler)
- func (t *Tracker) SetTickObserver(fn func())
- func (t *Tracker) Tick(ctx context.Context, elapsed time.Duration) (*TickResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
DecayRate float64
AccessBoost float64
HotThreshold float64
ColdThreshold float64
NotifyThreshold float64
SummarizeRebound float64
TickInterval time.Duration
ColdNotifyTTL time.Duration
ColdNotifyLimit int
Enabled bool
}
func DefaultConfig ¶
func DefaultConfig() Config
func (Config) WithOverrides ¶ added in v0.3.4
func (c Config) WithOverrides(o config.TemperatureConfig) Config
Apply a config.json temperature block over c; nil fields keep c's value.
type TickResult ¶
type Tracker ¶
type Tracker struct {
// contains filtered or unexported fields
}
func NewTracker ¶
func (*Tracker) MarkNotified ¶ added in v0.1.4
Stamp ids as notified at time.Now(); pair with dedupCold after a successful send.
func (*Tracker) RecordAccess ¶
func (*Tracker) SetTickObserver ¶ added in v0.3.4
func (t *Tracker) SetTickObserver(fn func())
SetTickObserver sets a callback fired after each tick that decayed a node, set before Run (nil disables).
Click to show internal directories.
Click to hide internal directories.