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-09-19 16:14:55 -04:00
|
|
|
|
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
2019-08-28 19:12:57 -04:00
|
|
|
"errors"
|
2016-09-19 16:14:55 -04:00
|
|
|
)
|
|
|
|
|
2019-11-04 12:30:59 -05:00
|
|
|
const (
|
2021-09-30 14:53:01 -04:00
|
|
|
lockRESTVersion = "v7" // Add msgp for lockArgs
|
2020-02-21 00:59:57 -05:00
|
|
|
lockRESTVersionPrefix = SlashSeparator + lockRESTVersion
|
2019-11-04 12:30:59 -05:00
|
|
|
lockRESTPrefix = minioReservedBucketPath + "/lock"
|
|
|
|
)
|
2019-04-18 02:16:27 -04:00
|
|
|
|
|
|
|
const (
|
2021-01-25 13:01:27 -05:00
|
|
|
lockRESTMethodHealth = "/health"
|
2021-03-03 21:36:43 -05:00
|
|
|
lockRESTMethodRefresh = "/refresh"
|
2021-01-25 13:01:27 -05:00
|
|
|
lockRESTMethodLock = "/lock"
|
|
|
|
lockRESTMethodRLock = "/rlock"
|
|
|
|
lockRESTMethodUnlock = "/unlock"
|
|
|
|
lockRESTMethodRUnlock = "/runlock"
|
|
|
|
lockRESTMethodForceUnlock = "/force-unlock"
|
2019-04-18 02:16:27 -04:00
|
|
|
)
|
|
|
|
|
2019-11-25 19:39:43 -05:00
|
|
|
var (
|
2020-09-23 15:00:29 -04:00
|
|
|
errLockConflict = errors.New("lock conflict")
|
|
|
|
errLockNotInitialized = errors.New("lock not initialized")
|
2021-03-03 21:36:43 -05:00
|
|
|
errLockNotFound = errors.New("lock not found")
|
2019-11-25 19:39:43 -05:00
|
|
|
)
|