github.com/minio/mc@v0.0.0-20240503112107-b471de8d1882/cmd/health.go (about) 1 // Copyright (c) 2015-2022 MinIO, Inc. 2 // 3 // This file is part of MinIO Object Storage stack 4 // 5 // This program is free software: you can redistribute it and/or modify 6 // it under the terms of the GNU Affero General Public License as published by 7 // the Free Software Foundation, either version 3 of the License, or 8 // (at your option) any later version. 9 // 10 // This program is distributed in the hope that it will be useful 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU Affero General Public License for more details. 14 // 15 // You should have received a copy of the GNU Affero General Public License 16 // along with this program. If not, see <http://www.gnu.org/licenses/>. 17 18 package cmd 19 20 import "time" 21 22 // HealthReportInfo - interface to be implemented by health report schema struct 23 type HealthReportInfo interface { 24 GetTimestamp() time.Time 25 GetStatus() string 26 GetError() string 27 message 28 } 29 30 // HealthReportHeader - Header of the subnet health report 31 // expected to generate JSON output of the form 32 // {"subnet":{"health":{"version":"v1"}}} 33 type HealthReportHeader struct { 34 Subnet Health `json:"subnet"` 35 } 36 37 // Health - intermediate struct for subnet health header 38 // Just used to achieve the JSON structure we want 39 type Health struct { 40 Health SchemaVersion `json:"health"` 41 } 42 43 // SchemaVersion - version of the health report schema 44 type SchemaVersion struct { 45 Version string `json:"version"` 46 }