Skip to content

Commit e605ffe

Browse files
anjalshireeshharshavardhana
authored andcommitted
Add license to server info (#343)
This allows health diagnostics to capture the information, alerting the customer when the license is nearing expiration.
1 parent 20f61ea commit e605ffe

6 files changed

+486
-9
lines changed

health.go

+1
Original file line numberDiff line numberDiff line change
@@ -1050,6 +1050,7 @@ type ServerInfo struct {
10501050
GCStats *GCStats `json:"gc_stats,omitempty"`
10511051
MinioEnvVars map[string]string `json:"minio_env_vars,omitempty"`
10521052
Edition string `json:"edition"`
1053+
License *LicenseInfo `json:"license,omitempty"`
10531054
}
10541055

10551056
// MinioInfo contains MinIO server and object storage information.

info-commands.go

+1
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ type ServerProperties struct {
417417
GCStats *GCStats `json:"gc_stats,omitempty"`
418418
MinioEnvVars map[string]string `json:"minio_env_vars,omitempty"`
419419
Edition string `json:"edition"`
420+
License *LicenseInfo `json:"license,omitempty"`
420421
}
421422

422423
// MemStats is strip down version of runtime.MemStats containing memory stats of MinIO server.

info-commands_gen.go

+97-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

license.go

+4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ import (
2626
"time"
2727
)
2828

29+
//msgp:clearomitted
30+
//msgp:tag json
31+
//go:generate msgp
2932
// LicenseInfo is a structure containing MinIO license information.
33+
3034
type LicenseInfo struct {
3135
ID string `json:"ID"` // The license ID
3236
Organization string `json:"Organization"` // Name of the organization using the license

0 commit comments

Comments
 (0)