2021-04-18 15:41:13 -04:00
|
|
|
// Copyright (c) 2015-2021 MinIO, Inc.
|
|
|
|
//
|
|
|
|
// This file is part of MinIO Object Storage stack
|
|
|
|
//
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU Affero General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2016-12-19 20:04:31 -05:00
|
|
|
|
|
|
|
package cmd
|
|
|
|
|
2017-04-11 18:44:27 -04:00
|
|
|
// SetupType - enum for setup type.
|
|
|
|
type SetupType int
|
2016-12-19 20:04:31 -05:00
|
|
|
|
2017-04-11 18:44:27 -04:00
|
|
|
const (
|
2020-01-07 12:13:44 -05:00
|
|
|
// UnknownSetupType - starts with unknown setup type.
|
|
|
|
UnknownSetupType SetupType = iota
|
|
|
|
|
2017-04-11 18:44:27 -04:00
|
|
|
// FSSetupType - FS setup type enum.
|
2020-01-07 12:13:44 -05:00
|
|
|
FSSetupType
|
2016-12-19 20:04:31 -05:00
|
|
|
|
2022-05-30 13:58:37 -04:00
|
|
|
// ErasureSDSetupType - Erasure single drive setup enum.
|
|
|
|
ErasureSDSetupType
|
|
|
|
|
2020-06-12 23:04:01 -04:00
|
|
|
// ErasureSetupType - Erasure setup type enum.
|
|
|
|
ErasureSetupType
|
2016-12-19 20:04:31 -05:00
|
|
|
|
2020-06-12 23:04:01 -04:00
|
|
|
// DistErasureSetupType - Distributed Erasure setup type enum.
|
|
|
|
DistErasureSetupType
|
2018-12-03 03:32:14 -05:00
|
|
|
|
|
|
|
// GatewaySetupType - gateway setup type enum.
|
|
|
|
GatewaySetupType
|
2017-04-11 18:44:27 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
func (setupType SetupType) String() string {
|
|
|
|
switch setupType {
|
|
|
|
case FSSetupType:
|
|
|
|
return globalMinioModeFS
|
2022-05-30 13:58:37 -04:00
|
|
|
case ErasureSDSetupType:
|
|
|
|
return globalMinioModeErasureSD
|
2020-06-12 23:04:01 -04:00
|
|
|
case ErasureSetupType:
|
|
|
|
return globalMinioModeErasure
|
|
|
|
case DistErasureSetupType:
|
|
|
|
return globalMinioModeDistErasure
|
2018-12-03 03:32:14 -05:00
|
|
|
case GatewaySetupType:
|
|
|
|
return globalMinioModeGatewayPrefix
|
2017-04-11 18:44:27 -04:00
|
|
|
}
|
2016-12-19 20:04:31 -05:00
|
|
|
|
2020-01-07 12:13:44 -05:00
|
|
|
return "unknown"
|
2016-12-19 20:04:31 -05:00
|
|
|
}
|