Connection Manager - disconnect on high watermark

What is the current way of deciding which peers to disconnect when we hit the connection manager high watermark in go-libp2p?

The way it works in go-libp2p connection manager v1 is as follows. We expect this to be obsolete with v2.

  1. we get all active connections.
  2. we discard those within their grace period.
  3. we stack rank them based on their tags (cumulative sum of all tag values).
  4. we prune as many as needed until the connection count equals “low watermark”.

I might be missing something; please shout if that’s the case!

Can you elaborate a bit about tags and tag values? How do the tags get applied in the first place?