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
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2017-03-24 20:22:42 +0300
committerJacob Vosmaer <jacob@gitlab.com>2017-03-29 15:48:05 +0300
commit1904c80f3dd5437cb39aa90de933279bf9635678 (patch)
tree6de907068aadafc992ada78ffb0b484b1ad74faa /lib/gitlab/gitaly_client.rb
parenteee07f1c7cacdd24cbd66917ba66e703128f65c6 (diff)
Change socket_path to gitaly_address
Diffstat (limited to 'lib/gitlab/gitaly_client.rb')
-rw-r--r--lib/gitlab/gitaly_client.rb16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/gitlab/gitaly_client.rb b/lib/gitlab/gitaly_client.rb
index c947075bf62..a0dbe0a8c11 100644
--- a/lib/gitlab/gitaly_client.rb
+++ b/lib/gitlab/gitaly_client.rb
@@ -4,9 +4,11 @@ module Gitlab
module GitalyClient
SERVER_VERSION_FILE = 'GITALY_SERVER_VERSION'.freeze
- def self.configure_channel(shard, socket_path)
- @channel ||= {}
- @channel[shard] = new_channel("unix://#{socket_path}")
+ def self.configure_channel(storage, address)
+ @addresses ||= {}
+ @addresses[storage] = address
+ @channels ||= {}
+ @channels[storage] = new_channel(address)
end
def self.new_channel(address)
@@ -16,8 +18,12 @@ module Gitlab
GRPC::Core::Channel.new(address, {}, :this_channel_is_insecure)
end
- def self.get_channel(shard)
- @channel.fetch(shard)
+ def self.get_channel(storage)
+ @channels[storage]
+ end
+
+ def self.get_address(storage)
+ @addresses[storage]
end
def self.enabled?