This commit is contained in:
TheoneFx 2025-05-22 10:06:28 -07:00 committed by GitHub
commit 8ab677db22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 7 deletions

View File

@ -15,13 +15,15 @@ package lock
// TryLockRequest is a lock acquire request.
type TryLockRequest struct {
ResourceID string `json:"resourceId"`
LockOwner string `json:"lockOwner"`
ExpiryInSeconds int32 `json:"expiryInSeconds"`
ResourceID string `json:"resourceId"`
LockOwner string `json:"lockOwner"`
ExpiryInSeconds int32 `json:"expiryInSeconds"`
Metadata map[string]string `json:"metadata"`
}
// UnlockRequest is a lock release request.
type UnlockRequest struct {
ResourceID string `json:"resourceId"`
LockOwner string `json:"lockOwner"`
ResourceID string `json:"resourceId"`
LockOwner string `json:"lockOwner"`
Metadata map[string]string `json:"metadata"`
}

View File

@ -15,12 +15,14 @@ package lock
// Lock acquire request was successful or not.
type TryLockResponse struct {
Success bool `json:"success"`
Success bool `json:"success"`
Metadata map[string]string `json:"metadata"`
}
// Status when releasing the lock.
type UnlockResponse struct {
Status Status `json:"status"`
Status Status `json:"status"`
Metadata map[string]string `json:"metadata"`
}
type Status int32