Skip to content

Commit e7778e6

Browse files
authored
Merge pull request #964 from ashikjm/955-docupdate
[v3.6] Updating api reference documentation
2 parents 831c45b + 379b846 commit e7778e6

File tree

2 files changed

+136
-264
lines changed

2 files changed

+136
-264
lines changed

content/en/docs/v3.6/dev-guide/api_concurrency_reference_v3.md

-34
Original file line numberDiff line numberDiff line change
@@ -13,42 +13,32 @@ The lock service exposes client-side locking facilities as a gRPC interface.
1313
| 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. |
1414
| 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. |
1515

16-
17-
1816
##### message `LockRequest` (server/etcdserver/api/v3lock/v3lockpb/v3lock.proto)
1917

2018
| Field | Description | Type |
2119
| ----- | ----------- | ---- |
2220
| name | name is the identifier for the distributed shared lock to be acquired. | bytes |
2321
| 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 |
2422

25-
26-
2723
##### message `LockResponse` (server/etcdserver/api/v3lock/v3lockpb/v3lock.proto)
2824

2925
| Field | Description | Type |
3026
| ----- | ----------- | ---- |
3127
| header | | etcdserverpb.ResponseHeader |
3228
| 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 |
3329

34-
35-
3630
##### message `UnlockRequest` (server/etcdserver/api/v3lock/v3lockpb/v3lock.proto)
3731

3832
| Field | Description | Type |
3933
| ----- | ----------- | ---- |
4034
| key | key is the lock ownership key granted by Lock. | bytes |
4135

42-
43-
4436
##### message `UnlockResponse` (server/etcdserver/api/v3lock/v3lockpb/v3lock.proto)
4537

4638
| Field | Description | Type |
4739
| ----- | ----------- | ---- |
4840
| header | | etcdserverpb.ResponseHeader |
4941

50-
51-
5242
##### service `Election` (server/etcdserver/api/v3election/v3electionpb/v3election.proto)
5343

5444
The election service exposes client-side election facilities as a gRPC interface.
@@ -61,8 +51,6 @@ The election service exposes client-side election facilities as a gRPC interface
6151
| Observe | LeaderRequest | LeaderResponse | Observe streams election proclamations in-order as made by the election's elected leaders. |
6252
| Resign | ResignRequest | ResignResponse | Resign releases election leadership so other campaigners may acquire leadership on the election. |
6353

64-
65-
6654
##### message `CampaignRequest` (server/etcdserver/api/v3election/v3electionpb/v3election.proto)
6755

6856
| Field | Description | Type |
@@ -71,17 +59,13 @@ The election service exposes client-side election facilities as a gRPC interface
7159
| 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 |
7260
| value | value is the initial proclaimed value set when the campaigner wins the election. | bytes |
7361

74-
75-
7662
##### message `CampaignResponse` (server/etcdserver/api/v3election/v3electionpb/v3election.proto)
7763

7864
| Field | Description | Type |
7965
| ----- | ----------- | ---- |
8066
| header | | etcdserverpb.ResponseHeader |
8167
| leader | leader describes the resources used for holding leadereship of the election. | LeaderKey |
8268

83-
84-
8569
##### message `LeaderKey` (server/etcdserver/api/v3election/v3electionpb/v3election.proto)
8670

8771
| Field | Description | Type |
@@ -91,58 +75,44 @@ The election service exposes client-side election facilities as a gRPC interface
9175
| 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 |
9276
| lease | lease is the lease ID of the election leader. | int64 |
9377

94-
95-
9678
##### message `LeaderRequest` (server/etcdserver/api/v3election/v3electionpb/v3election.proto)
9779

9880
| Field | Description | Type |
9981
| ----- | ----------- | ---- |
10082
| name | name is the election identifier for the leadership information. | bytes |
10183

102-
103-
10484
##### message `LeaderResponse` (server/etcdserver/api/v3election/v3electionpb/v3election.proto)
10585

10686
| Field | Description | Type |
10787
| ----- | ----------- | ---- |
10888
| header | | etcdserverpb.ResponseHeader |
10989
| kv | kv is the key-value pair representing the latest leader update. | mvccpb.KeyValue |
11090

111-
112-
11391
##### message `ProclaimRequest` (server/etcdserver/api/v3election/v3electionpb/v3election.proto)
11492

11593
| Field | Description | Type |
11694
| ----- | ----------- | ---- |
11795
| leader | leader is the leadership hold on the election. | LeaderKey |
11896
| value | value is an update meant to overwrite the leader's current value. | bytes |
11997

120-
121-
12298
##### message `ProclaimResponse` (server/etcdserver/api/v3election/v3electionpb/v3election.proto)
12399

124100
| Field | Description | Type |
125101
| ----- | ----------- | ---- |
126102
| header | | etcdserverpb.ResponseHeader |
127103

128-
129-
130104
##### message `ResignRequest` (server/etcdserver/api/v3election/v3electionpb/v3election.proto)
131105

132106
| Field | Description | Type |
133107
| ----- | ----------- | ---- |
134108
| leader | leader is the leadership to relinquish by resignation. | LeaderKey |
135109

136-
137-
138110
##### message `ResignResponse` (server/etcdserver/api/v3election/v3electionpb/v3election.proto)
139111

140112
| Field | Description | Type |
141113
| ----- | ----------- | ---- |
142114
| header | | etcdserverpb.ResponseHeader |
143115

144-
145-
146116
##### message `Event` (api/mvccpb/kv.proto)
147117

148118
| Field | Description | Type |
@@ -151,8 +121,6 @@ The election service exposes client-side election facilities as a gRPC interface
151121
| 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 |
152122
| prev_kv | prev_kv holds the key-value pair before the event happens. | KeyValue |
153123

154-
155-
156124
##### message `KeyValue` (api/mvccpb/kv.proto)
157125

158126
| Field | Description | Type |
@@ -164,5 +132,3 @@ The election service exposes client-side election facilities as a gRPC interface
164132
| value | value is the value held by the key, in bytes. | bytes |
165133
| 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 |
166134

167-
168-

0 commit comments

Comments
 (0)