diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-07-21 10:36:31 +0300 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-07-26 10:32:34 +0300 |
commit | acf4a36b3ed81c952d3f2edbfb054118b1d9dfff (patch) | |
tree | 5559cbe8358a143e47778c97e6573ed1634312d2 /lib/gitlab/gitaly_client/repository_service.rb | |
parent | 37056673e4c25db20c70b522985ed8db70625844 (diff) |
Implement GRPC call to RepositoryService
Diffstat (limited to 'lib/gitlab/gitaly_client/repository_service.rb')
-rw-r--r-- | lib/gitlab/gitaly_client/repository_service.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/gitlab/gitaly_client/repository_service.rb b/lib/gitlab/gitaly_client/repository_service.rb new file mode 100644 index 00000000000..f5d84ea8762 --- /dev/null +++ b/lib/gitlab/gitaly_client/repository_service.rb @@ -0,0 +1,16 @@ +module Gitlab + module GitalyClient + class RepositoryService + def initialize(repository) + @repository = repository + @gitaly_repo = repository.gitaly_repository + end + + def exists? + request = Gitaly::RepositoryExistsRequest.new(repository: @gitaly_repo) + + GitalyClient.call(@repository.storage, :repository_service, :exists, request).exists + end + end + end +end |