raft_internal.proto 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. syntax = "proto3";
  2. package etcdserverpb;
  3. import "gogoproto/gogo.proto";
  4. import "etcdserver.proto";
  5. import "rpc.proto";
  6. option (gogoproto.marshaler_all) = true;
  7. option (gogoproto.sizer_all) = true;
  8. option (gogoproto.unmarshaler_all) = true;
  9. option (gogoproto.goproto_getters_all) = false;
  10. message RequestHeader {
  11. uint64 ID = 1;
  12. // username is a username that is associated with an auth token of gRPC connection
  13. string username = 2;
  14. // auth_revision is a revision number of auth.authStore. It is not related to mvcc
  15. uint64 auth_revision = 3;
  16. }
  17. // An InternalRaftRequest is the union of all requests which can be
  18. // sent via raft.
  19. message InternalRaftRequest {
  20. RequestHeader header = 100;
  21. uint64 ID = 1;
  22. Request v2 = 2;
  23. RangeRequest range = 3;
  24. PutRequest put = 4;
  25. DeleteRangeRequest delete_range = 5;
  26. TxnRequest txn = 6;
  27. CompactionRequest compaction = 7;
  28. LeaseGrantRequest lease_grant = 8;
  29. LeaseRevokeRequest lease_revoke = 9;
  30. AlarmRequest alarm = 10;
  31. AuthEnableRequest auth_enable = 1000;
  32. AuthDisableRequest auth_disable = 1011;
  33. InternalAuthenticateRequest authenticate = 1012;
  34. AuthUserAddRequest auth_user_add = 1100;
  35. AuthUserDeleteRequest auth_user_delete = 1101;
  36. AuthUserGetRequest auth_user_get = 1102;
  37. AuthUserChangePasswordRequest auth_user_change_password = 1103;
  38. AuthUserGrantRoleRequest auth_user_grant_role = 1104;
  39. AuthUserRevokeRoleRequest auth_user_revoke_role = 1105;
  40. AuthUserListRequest auth_user_list = 1106;
  41. AuthRoleListRequest auth_role_list = 1107;
  42. AuthRoleAddRequest auth_role_add = 1200;
  43. AuthRoleDeleteRequest auth_role_delete = 1201;
  44. AuthRoleGetRequest auth_role_get = 1202;
  45. AuthRoleGrantPermissionRequest auth_role_grant_permission = 1203;
  46. AuthRoleRevokePermissionRequest auth_role_revoke_permission = 1204;
  47. }
  48. message EmptyResponse {
  49. }
  50. // What is the difference between AuthenticateRequest (defined in rpc.proto) and InternalAuthenticateRequest?
  51. // InternalAuthenticateRequest has a member that is filled by etcdserver and shouldn't be user-facing.
  52. // For avoiding misusage the field, we have an internal version of AuthenticateRequest.
  53. message InternalAuthenticateRequest {
  54. string name = 1;
  55. string password = 2;
  56. // simple_token is generated in API layer (etcdserver/v3_server.go)
  57. string simple_token = 3;
  58. }