Running the app with `-app.pipe.cleanup-only` will delete any records
from Consul that are marked as deleted more than ten minutes ago, then
exit.
This is so you can set it to run as a cronjob, e.g. once an hour.
golint has gained a new check and we don't freeze the golint version so CI was
failing on unrelated PRs:
app/multitenant/consul_client.go:69:2: redundant if ...; err != nil check, just return error instead.
report/marshal.go:188:2: redundant if ...; err != nil check, just return error instead.
Fix those!
Fix a few bugs in the consul pipe router:
- Don't share a pointer
- Write nil to pipe when closing a bridge connection to ensure the connection shutdown.
- Ensure we shutdown bridge connections correctly