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
This is a generated documentation. Please read the proto files for more.
service Auth (etcdserver/etcdserverpb/rpc.proto)
Method
Request Type
Response Type
Description
AuthEnable
AuthEnableRequest
AuthEnableResponse
AuthEnable enables authentication.
AuthDisable
AuthDisableRequest
AuthDisableResponse
AuthDisable disables authentication.
Authenticate
AuthenticateRequest
AuthenticateResponse
Authenticate processes an authenticate request.
UserAdd
AuthUserAddRequest
AuthUserAddResponse
UserAdd adds a new user.
UserGet
AuthUserGetRequest
AuthUserGetResponse
UserGet gets detailed user information.
UserList
AuthUserListRequest
AuthUserListResponse
UserList gets a list of all users.
UserDelete
AuthUserDeleteRequest
AuthUserDeleteResponse
UserDelete deletes a specified user.
UserChangePassword
AuthUserChangePasswordRequest
AuthUserChangePasswordResponse
UserChangePassword changes the password of a specified user.
UserGrantRole
AuthUserGrantRoleRequest
AuthUserGrantRoleResponse
UserGrant grants a role to a specified user.
UserRevokeRole
AuthUserRevokeRoleRequest
AuthUserRevokeRoleResponse
UserRevokeRole revokes a role of specified user.
RoleAdd
AuthRoleAddRequest
AuthRoleAddResponse
RoleAdd adds a new role.
RoleGet
AuthRoleGetRequest
AuthRoleGetResponse
RoleGet gets detailed role information.
RoleList
AuthRoleListRequest
AuthRoleListResponse
RoleList gets lists of all roles.
RoleDelete
AuthRoleDeleteRequest
AuthRoleDeleteResponse
RoleDelete deletes a specified role.
RoleGrantPermission
AuthRoleGrantPermissionRequest
AuthRoleGrantPermissionResponse
RoleGrantPermission grants a permission of a specified key or range to a specified role.
RoleRevokePermission
AuthRoleRevokePermissionRequest
AuthRoleRevokePermissionResponse
RoleRevokePermission revokes a key or range permission of a specified role.
service Cluster (etcdserver/etcdserverpb/rpc.proto)
Method
Request Type
Response Type
Description
MemberAdd
MemberAddRequest
MemberAddResponse
MemberAdd adds a member into the cluster.
MemberRemove
MemberRemoveRequest
MemberRemoveResponse
MemberRemove removes an existing member from the cluster.
MemberUpdate
MemberUpdateRequest
MemberUpdateResponse
MemberUpdate updates the member configuration.
MemberList
MemberListRequest
MemberListResponse
MemberList lists all the members in the cluster.
service KV (etcdserver/etcdserverpb/rpc.proto)
Method
Request Type
Response Type
Description
Range
RangeRequest
RangeResponse
Range gets the keys in the range from the key-value store.
Put
PutRequest
PutResponse
Put puts the given key into the key-value store. A put request increments the revision of the key-value store and generates one event in the event history.
DeleteRange
DeleteRangeRequest
DeleteRangeResponse
DeleteRange deletes the given range from the key-value store. A delete request increments the revision of the key-value store and generates a delete event in the event history for every deleted key.
Txn
TxnRequest
TxnResponse
Txn processes multiple requests in a single transaction. A txn request increments the revision of the key-value store and generates events with the same revision for every completed request. It is not allowed to modify the same key several times within one txn.
Compact
CompactionRequest
CompactionResponse
Compact compacts the event history in the etcd key-value store. The key-value store should be periodically compacted or the event history will continue to grow indefinitely.
service Lease (etcdserver/etcdserverpb/rpc.proto)
Method
Request Type
Response Type
Description
LeaseGrant
LeaseGrantRequest
LeaseGrantResponse
LeaseGrant creates a lease which expires if the server does not receive a keepAlive within a given time to live period. All keys attached to the lease will be expired and deleted if the lease expires. Each expired key generates a delete event in the event history.
LeaseRevoke
LeaseRevokeRequest
LeaseRevokeResponse
LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted.
LeaseKeepAlive
LeaseKeepAliveRequest
LeaseKeepAliveResponse
LeaseKeepAlive keeps the lease alive by streaming keep alive requests from the client to the server and streaming keep alive responses from the server to the client.
LeaseTimeToLive
LeaseTimeToLiveRequest
LeaseTimeToLiveResponse
LeaseTimeToLive retrieves lease information.
LeaseLeases
LeaseLeasesRequest
LeaseLeasesResponse
LeaseLeases lists all existing leases.
service Maintenance (etcdserver/etcdserverpb/rpc.proto)
Method
Request Type
Response Type
Description
Alarm
AlarmRequest
AlarmResponse
Alarm activates, deactivates, and queries alarms regarding cluster health.
Status
StatusRequest
StatusResponse
Status gets the status of the member.
Defragment
DefragmentRequest
DefragmentResponse
Defragment defragments a member's backend database to recover storage space.
Hash
HashRequest
HashResponse
Hash computes the hash of whole backend keyspace, including key, lease, and other buckets in storage. This is designed for testing ONLY! Do not rely on this in production with ongoing transactions, since Hash operation does not hold MVCC locks. Use "HashKV" API instead for "key" bucket consistency checks.
HashKV
HashKVRequest
HashKVResponse
HashKV computes the hash of all MVCC keys up to a given revision. It only iterates "key" bucket in backend storage.
Snapshot
SnapshotRequest
SnapshotResponse
Snapshot sends a snapshot of the entire backend from a member over a stream to a client.
MoveLeader
MoveLeaderRequest
MoveLeaderResponse
MoveLeader requests current leader node to transfer its leadership to transferee.
service Watch (etcdserver/etcdserverpb/rpc.proto)
Method
Request Type
Response Type
Description
Watch
WatchRequest
WatchResponse
Watch watches for events happening or that have happened. Both input and output are streams; the input stream is for creating and canceling watchers and the output stream sends events. One watch RPC can watch on multiple key ranges, streaming events for several watches at once. The entire event history can be watched starting from the last compaction revision.
CompactionRequest compacts the key-value store up to a given revision. All superseded keys with a revision less than the compaction revision will be removed.
Field
Description
Type
revision
revision is the key-value store revision for the compaction operation.
int64
physical
physical is set so the RPC will wait until the compaction is physically applied to the local database such that compacted entries are totally removed from the backend database.
range_end is the key following the last key to delete for the range [key, range_end). If range_end is not given, the range is defined to contain only the key argument. If range_end is one bit larger than the given key, then the range is all the keys with the prefix (the given key). If range_end is '\0', the range is all keys greater than or equal to the key argument.
bytes
prev_kv
If prev_kv is set, etcd gets the previous key-value pairs before deleting it. The previous key-value pairs will be returned in the delete response.
key is the first key for the range. If range_end is not given, the request only looks up key.
bytes
range_end
range_end is the upper bound on the requested range [key, range_end). If range_end is '\0', the range is all keys >= key. If range_end is key plus one (e.g., "aa"+1 == "ab", "a\xff"+1 == "b"), then the range request gets all keys prefixed with key. If both key and range_end are '\0', then the range request returns all keys.
bytes
limit
limit is a limit on the number of keys returned for the request. When limit is set to 0, it is treated as no limit.
int64
revision
revision is the point-in-time of the key-value store to use for the range. If revision is less or equal to zero, the range is over the newest key-value store. If the revision has been compacted, ErrCompacted is returned as a response.
int64
sort_order
sort_order is the order for returned sorted results.
SortOrder
sort_target
sort_target is the key-value field to use for sorting.
SortTarget
serializable
serializable sets the range request to use serializable member-local reads. Range requests are linearizable by default; linearizable requests have higher latency and lower throughput than serializable requests but reflect the current consensus of the cluster. For better performance, in exchange for possible stale reads, a serializable range request is served locally without needing to reach consensus with other nodes in the cluster.
bool
keys_only
keys_only when set returns only the keys and not the values.
bool
count_only
count_only when set returns only the count of the keys in the range.
bool
min_mod_revision
min_mod_revision is the lower bound for returned key mod revisions; all keys with lesser mod revisions will be filtered away.
int64
max_mod_revision
max_mod_revision is the upper bound for returned key mod revisions; all keys with greater mod revisions will be filtered away.
int64
min_create_revision
min_create_revision is the lower bound for returned key create revisions; all keys with lesser create revisions will be filtered away.
int64
max_create_revision
max_create_revision is the upper bound for returned key create revisions; all keys with greater create revisions will be filtered away.
From google paxosdb paper: Our implementation hinges around a powerful primitive which we call MultiOp. All other database operations except for iteration are implemented as a single call to MultiOp. A MultiOp is applied atomically and consists of three components: 1. A list of tests called guard. Each test in guard checks a single entry in the database. It may check for the absence or presence of a value, or compare with a given value. Two different tests in the guard may apply to the same or different entries in the database. All tests in the guard are applied and MultiOp returns the results. If all tests are true, MultiOp executes t op (see item 2 below), otherwise it executes f op (see item 3 below). 2. A list of database operations called t op. Each operation in the list is either an insert, delete, or lookup operation, and applies to a single database entry. Two different operations in the list may apply to the same or different entries in the database. These operations are executed if guard evaluates to true. 3. A list of database operations called f op. Like t op, but executed if guard evaluates to false.
Field
Description
Type
compare
compare is a list of predicates representing a conjunction of terms. If the comparisons succeed, then the success requests will be processed in order, and the response will contain their respective responses in order. If the comparisons fail, then the failure requests will be processed in order, and the response will contain their respective responses in order.
(slice of) Compare
success
success is a list of requests which will be applied when compare evaluates to true.
(slice of) RequestOp
failure
failure is a list of requests which will be applied when compare evaluates to false.
range_end is the end of the range [key, range_end) to watch. If range_end is not given, only the key argument is watched. If range_end is equal to '\0', all keys greater than or equal to the key argument are watched. If the range_end is one bit larger than the given key, then all keys with the prefix (the given key) will be watched.
bytes
start_revision
start_revision is an optional revision to watch from (inclusive). No start_revision is "now".
int64
progress_notify
progress_notify is set so that the etcd server will periodically send a WatchResponse with no events to the new watcher if there are no recent events. It is useful when clients wish to recover a disconnected watcher starting from a recent known revision. The etcd server may decide how often it will send notifications based on current load.
bool
filters
filters filter the events at server side before it sends back to the watcher.
(slice of) FilterType
prev_kv
If prev_kv is set, created watcher gets the previous KV before the event happens. If the previous KV is already compacted, nothing will be returned.
bool
watch_id
If watch_id is provided and non-zero, it will be assigned to this watcher. Since creating a watcher in etcd is not a synchronous operation, this can be used ensure that ordering is correct when creating multiple watchers on the same stream. Creating a watcher with an ID already in use on the stream will cause an error to be returned.
watch_id is the ID of the watcher that corresponds to the response.
int64
created
created is set to true if the response is for a create watch request. The client should record the watch_id and expect to receive events for the created watcher from the same stream. All events sent to the created watcher will attach with the same watch_id.
bool
canceled
canceled is set to true if the response is for a cancel watch request. No further events will be sent to the canceled watcher.
bool
compact_revision
compact_revision is set to the minimum index if a watcher tries to watch at a compacted index. This happens when creating a watcher at a compacted revision or the watcher cannot catch up with the progress of the key-value store. The client should treat the watcher as canceled and should not try to create any watcher with the same start_revision again.
int64
cancel_reason
cancel_reason indicates the reason for canceling the watcher.
string
events
(slice of) mvccpb.Event
message Event (mvcc/mvccpb/kv.proto)
Field
Description
Type
type
type is the kind of event. If type is a PUT, it indicates new data has been stored to the key. If type is a DELETE, it indicates the key was deleted.
EventType
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
prev_kv
prev_kv holds the key-value pair before the event happens.
KeyValue
message KeyValue (mvcc/mvccpb/kv.proto)
Field
Description
Type
key
key is the key in bytes. An empty key is not allowed.
bytes
create_revision
create_revision is the revision of last creation on this key.
int64
mod_revision
mod_revision is the revision of last modification on this key.
int64
version
version is the version of the key. A deletion resets the version to zero and any modification of the key increases its version.
int64
value
value is the value held by the key, in bytes.
bytes
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.