Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/ruby
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2021-07-21 02:16:33 +0300
committerStan Hu <stanhu@gmail.com>2021-07-21 08:32:27 +0300
commitb458bbc55c56011d9e7b1df1092b9c008cea575f (patch)
treecef7e1f151a13e25860a1abaebff912a1af698cd /ruby
parent499b72a41063d61dbb8a73ed7ffa7aa42f1584fd (diff)
Add pagination to GetTreeEntries RPC
If a page limit larger than 0 is set, this RPC will only retrieve that number of entries from the list. If a page token is set, this RPC will return entries after this OID. This reduces the amount of recursive calls needed to flatten a path. Relates to https://gitlab.com/gitlab-org/gitaly/-/issues/2704 Changelog: added
Diffstat (limited to 'ruby')
-rw-r--r--ruby/proto/gitaly/commit_pb.rb2
-rw-r--r--ruby/proto/gitaly/shared_pb.rb4
2 files changed, 6 insertions, 0 deletions
diff --git a/ruby/proto/gitaly/commit_pb.rb b/ruby/proto/gitaly/commit_pb.rb
index d064d1f5d..bd2187fd6 100644
--- a/ruby/proto/gitaly/commit_pb.rb
+++ b/ruby/proto/gitaly/commit_pb.rb
@@ -126,6 +126,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :path, :bytes, 3
optional :recursive, :bool, 4
optional :sort, :enum, 5, "gitaly.GetTreeEntriesRequest.SortBy"
+ optional :pagination_params, :message, 6, "gitaly.PaginationParameter"
end
add_enum "gitaly.GetTreeEntriesRequest.SortBy" do
value :DEFAULT, 0
@@ -133,6 +134,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
end
add_message "gitaly.GetTreeEntriesResponse" do
repeated :entries, :message, 1, "gitaly.TreeEntry"
+ optional :pagination_cursor, :message, 2, "gitaly.PaginationCursor"
end
add_message "gitaly.ListFilesRequest" do
optional :repository, :message, 1, "gitaly.Repository"
diff --git a/ruby/proto/gitaly/shared_pb.rb b/ruby/proto/gitaly/shared_pb.rb
index 0a9853223..51e0fbc6c 100644
--- a/ruby/proto/gitaly/shared_pb.rb
+++ b/ruby/proto/gitaly/shared_pb.rb
@@ -67,6 +67,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :page_token, :string, 1
optional :limit, :int32, 2
end
+ add_message "gitaly.PaginationCursor" do
+ optional :next_cursor, :string, 1
+ end
add_message "gitaly.GlobalOptions" do
optional :literal_pathspecs, :bool, 1
end
@@ -96,6 +99,7 @@ module Gitaly
User = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.User").msgclass
ObjectPool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.ObjectPool").msgclass
PaginationParameter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.PaginationParameter").msgclass
+ PaginationCursor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.PaginationCursor").msgclass
GlobalOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.GlobalOptions").msgclass
ObjectType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.ObjectType").enummodule
SignatureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.SignatureType").enummodule