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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2017-04-03 23:08:28 +0300
committerRobert Speicher <robert@gitlab.com>2017-04-03 23:08:28 +0300
commite98536fb384d76ed7e13238bebbca91b682f5172 (patch)
tree0b8adf6908b98b42e1ffad475fb05c1826a1fa5d /lib
parent103a2a9ab94490722286cd8426668a9ce0749c29 (diff)
parent09751c75ebaee03f5161c4e86f16a18a8f5b050f (diff)
Merge branch 'feature/support-grpc-calls-over-tcp-conn' into 'master'
Add support for Gitaly calls over TCP connection Closes gitaly#166 See merge request !10410
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/gitaly_client.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/gitaly_client.rb b/lib/gitlab/gitaly_client.rb
index a0dbe0a8c11..fe15fb12adb 100644
--- a/lib/gitlab/gitaly_client.rb
+++ b/lib/gitlab/gitaly_client.rb
@@ -12,9 +12,11 @@ module Gitlab
end
def self.new_channel(address)
- # NOTE: Gitaly currently runs on a Unix socket, so permissions are
+ address = address.sub(%r{^tcp://}, '') if URI(address).scheme == 'tcp'
+ # NOTE: When Gitaly runs on a Unix socket, permissions are
# handled using the file system and no additional authentication is
# required (therefore the :this_channel_is_insecure flag)
+ # TODO: Add authentication support when Gitaly is running on a TCP socket.
GRPC::Core::Channel.new(address, {}, :this_channel_is_insecure)
end