2016-09-19 16:14:55 -04:00
|
|
|
/*
|
2019-04-18 02:16:27 -04:00
|
|
|
* MinIO Cloud Storage, (C) 2019 MinIO, Inc.
|
2016-09-19 16:14:55 -04:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
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 (
|
2020-02-21 00:59:57 -05:00
|
|
|
lockRESTVersion = "v3"
|
|
|
|
lockRESTVersionPrefix = SlashSeparator + lockRESTVersion
|
2019-11-04 12:30:59 -05:00
|
|
|
lockRESTPrefix = minioReservedBucketPath + "/lock"
|
|
|
|
)
|
2019-04-18 02:16:27 -04:00
|
|
|
|
|
|
|
const (
|
2020-06-17 17:49:26 -04:00
|
|
|
lockRESTMethodHealth = "/health"
|
2019-11-13 15:17:45 -05:00
|
|
|
lockRESTMethodLock = "/lock"
|
|
|
|
lockRESTMethodRLock = "/rlock"
|
|
|
|
lockRESTMethodUnlock = "/unlock"
|
|
|
|
lockRESTMethodRUnlock = "/runlock"
|
2019-11-25 19:39:43 -05:00
|
|
|
lockRESTMethodExpired = "/expired"
|
2019-08-05 14:45:30 -04:00
|
|
|
|
|
|
|
// Unique ID of lock/unlock request.
|
|
|
|
lockRESTUID = "uid"
|
|
|
|
// Source contains the line number, function and file name of the code
|
|
|
|
// on the client node that requested the lock.
|
|
|
|
lockRESTSource = "source"
|
2019-04-18 02:16:27 -04:00
|
|
|
)
|
|
|
|
|
2019-11-25 19:39:43 -05:00
|
|
|
var (
|
|
|
|
errLockConflict = errors.New("lock conflict")
|
|
|
|
errLockNotExpired = errors.New("lock not expired")
|
|
|
|
)
|