You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/types
Avery Pennarun 19c3e6cc9e types/logger: rate limited: more hysteresis, better messages.
- Switch to our own simpler token bucket, since x/time/rate is missing
  necessary stuff (can't provide your own time func; can't check the
  current bucket contents) and it's overkill anyway.

- Add tests that actually include advancing time.

- Don't remove the rate limit on a message until there's enough room to
  print at least two more of them. When we do, we'll also print how
  many we dropped, as a contextual reminder that some were previously
  lost. (This is more like how the Linux kernel does it.)

- Reformat the [RATE LIMITED] messages to be shorter, and to not
  corrupt original message. Instead, we print the message, then print
  its format string.

- Use %q instead of \"%s\", for more accurate parsing later, if the
  format string contained quotes.

Fixes #1772

Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
3 years ago
..
empty types/empty: add Message, stop using mysterious *struct{} 4 years ago
flagtype types/flagtype: fix bug showing the default port value (shown in --help) 4 years ago
ipproto net/packet, wgengine/filter: support SCTP 3 years ago
key wgengine/magicsock: stop depending on UpdateDst in legacy codepaths. 3 years ago
logger types/logger: rate limited: more hysteresis, better messages. 3 years ago
netmap types/netmap: remove some old TODOs 3 years ago
nettype wgengine/magicsock, tstest/natlab: start hooking up natlab to magicsock 4 years ago
opt types/opt: add Bool.EqualBool method 4 years ago
pad32 net/portmapper: add NAT-PMP client, move port mapping service probing 3 years ago
persist types/persist: split controlclient.Persist into a small leaf package 3 years ago
preftype types/preftype: don't use iota for consts persisted to disk 3 years ago
strbuilder types/strbuilder: add a variant of strings.Builder that uses sync.Pool 4 years ago
structs types/structs: add structs.Incomparable annotation, use it where applicable 4 years ago
wgkey types/wgkey: use value receiver with MarshalJSON 3 years ago