Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

v0.5.5

Compare
Choose a tag to compare
@raulk raulk released this 14 May 16:28
· 99 commits to master since this release

Highlights

📉 Decaying tags in the Connection Manager

This release introduces Decaying Tags in the Connection Manager interfaces. A decaying tag is one whose value automatically decays over time.

The actual application of the decay behaviour is encapsulated in a user-provided decaying function (DecayFn). The function is called on every tick (determined by the tag's Interval property), and returns either the new value of the tag, or whether it should be erased altogether.

We do not set values directly on a decaying tag. Rather, we "bump" decaying tags by a delta. Doing so calls the BumpFn with the old value and the delta, to determine the new value.

Such a pluggable design affords a great deal of flexibility and versatility. Behaviours that are straightforward to implement include:

  • Decay a tag by -1, or by half its current value, on every tick.
  • Every time a value is bumped, sum it to its current value.
  • Exponentially boost a score with every bump.
  • Sum the incoming score, but keep it within min, max bounds.

To use Decaying Tags, check if the Connection Manager supports them first via the SupportsDecay function.

Check the godocs in the connmgr package for more info.

Minor changes

  • Stringer functions for network package enums.