Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add json tags to lock requests/responses #1788

Merged
merged 1 commit into from
Jun 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions lock/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ limitations under the License.

package lock

// Lock acquire request.
// TryLockRequest is a lock acquire request.
type TryLockRequest struct {
ResourceID string
LockOwner string
ExpiryInSeconds int32
ResourceID string `json:"resourceId"`
LockOwner string `json:"lockOwner"`
ExpiryInSeconds int32 `json:"expiryInSeconds"`
}

// Lock release request.
// UnlockRequest is a lock release request.
type UnlockRequest struct {
ResourceID string
LockOwner string
ResourceID string `json:"resourceId"`
LockOwner string `json:"lockOwner"`
}
4 changes: 2 additions & 2 deletions lock/responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ package lock

// Lock acquire request was successful or not.
type TryLockResponse struct {
Success bool
Success bool `json:"success"`
}

// Status when releasing the lock.
type UnlockResponse struct {
Status Status
Status Status `json:"status"`
}

type Status int32
Expand Down