add license banner for GNU AGPLv3 (#15178)

Bonus: rewrite subnet re-use of Transport
This commit is contained in:
Harshavardhana
2022-06-27 03:58:25 -07:00
committed by GitHub
parent 7d4fce09dc
commit 7b9b7cef11
7 changed files with 80 additions and 68 deletions

View File

@@ -134,3 +134,17 @@ func performCallhome(ctx context.Context) {
logger.LogIf(ctx, fmt.Errorf("Unable to perform callhome: %w", err))
}
}
const (
callhomeURL = "https://subnet.min.io/api/callhome"
callhomeURLDev = "http://localhost:9000/api/callhome"
)
func sendCallhomeInfo(ch CallhomeInfo) error {
url := callhomeURL
if globalIsCICD {
url = callhomeURLDev
}
_, err := globalSubnetConfig.Post(url, ch)
return err
}