You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/v3.6/dev-guide/api_concurrency_reference_v3.md
-34
Original file line number
Diff line number
Diff line change
@@ -13,42 +13,32 @@ The lock service exposes client-side locking facilities as a gRPC interface.
13
13
| Lock | LockRequest | LockResponse | Lock acquires a distributed shared lock on a given named lock. On success, it will return a unique key that exists so long as the lock is held by the caller. This key can be used in conjunction with transactions to safely ensure updates to etcd only occur while holding lock ownership. The lock is held until Unlock is called on the key or the lease associate with the owner expires. |
14
14
| Unlock | UnlockRequest | UnlockResponse | Unlock takes a key returned by Lock and releases the hold on lock. The next Lock caller waiting for the lock will then be woken up and given ownership of the lock. |
| name | name is the identifier for the distributed shared lock to be acquired. | bytes |
23
21
| lease | lease is the ID of the lease that will be attached to ownership of the lock. If the lease expires or is revoked and currently holds the lock, the lock is automatically released. Calls to Lock with the same lease will be treated as a single acquisition; locking twice with the same lease is a no-op. | int64 |
| key | key is a key that will exist on etcd for the duration that the Lock caller owns the lock. Users should not modify this key or the lock may exhibit undefined behavior. | bytes |
@@ -71,17 +59,13 @@ The election service exposes client-side election facilities as a gRPC interface
71
59
| lease | lease is the ID of the lease attached to leadership of the election. If the lease expires or is revoked before resigning leadership, then the leadership is transferred to the next campaigner, if any. | int64 |
72
60
| value | value is the initial proclaimed value set when the campaigner wins the election. | bytes |
@@ -91,58 +75,44 @@ The election service exposes client-side election facilities as a gRPC interface
91
75
| rev | rev is the creation revision of the key. It can be used to test for ownership of an election during transactions by testing the key's creation revision matches rev. | int64 |
92
76
| lease | lease is the lease ID of the election leader. | int64 |
@@ -151,8 +121,6 @@ The election service exposes client-side election facilities as a gRPC interface
151
121
| kv | kv holds the KeyValue for the event. A PUT event contains current kv pair. A PUT event with kv.Version=1 indicates the creation of a key. A DELETE/EXPIRE event contains the deleted key with its modification revision set to the revision of deletion. | KeyValue |
152
122
| prev_kv | prev_kv holds the key-value pair before the event happens. | KeyValue |
153
123
154
-
155
-
156
124
##### message `KeyValue` (api/mvccpb/kv.proto)
157
125
158
126
| Field | Description | Type |
@@ -164,5 +132,3 @@ The election service exposes client-side election facilities as a gRPC interface
164
132
| value | value is the value held by the key, in bytes. | bytes |
165
133
| lease | lease is the ID of the lease that attached to key. When the attached lease expires, the key will be deleted. If lease is 0, then no lease is attached to the key. | int64 |
0 commit comments