aws-xray 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws/xray/client.rb +1 -5
- data/lib/aws/xray/configuration.rb +5 -1
- data/lib/aws/xray/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0976ec151baafd973cfcb253bb8c72ceeceb1425'
|
4
|
+
data.tar.gz: b91bd7bf26e3fae566c962a4bd5f3a72d316ca1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2f85373ef66e1faa436030a78e58c3b88ef0b076d941b32c81f0d748b105a7a0a30c8b87241cc6dfafd5c4bbc96663c531282511ee4e53f32626aa0f54beb62
|
7
|
+
data.tar.gz: 00ad0675fca0043ea74a72579871253aa8780aa1e5dfe99d161466d3722d9f86ffe92c05b70d5caed9bf962d25520909119717c72c120ae22222cec56e9cdfc5
|
data/lib/aws/xray/client.rb
CHANGED
@@ -3,14 +3,10 @@ require 'socket'
|
|
3
3
|
module Aws
|
4
4
|
module Xray
|
5
5
|
class Client
|
6
|
-
option = ENV['AWS_XRAY_LOCATION']
|
7
|
-
DEFAULT_HOST = option ? option.split(':').first : 'localhost'
|
8
|
-
DEFAULT_PORT = option ? Integer(option.split(':').last) : 2000
|
9
|
-
|
10
6
|
# sock is for test
|
11
7
|
#
|
12
8
|
# XXX: keep options for implmenting copying later.
|
13
|
-
def initialize(host:
|
9
|
+
def initialize(host: nil, port: nil, sock: nil)
|
14
10
|
@host, @port = host, port
|
15
11
|
@sock = sock || UDPSocket.new
|
16
12
|
end
|
@@ -5,6 +5,10 @@ module Aws
|
|
5
5
|
module Xray
|
6
6
|
# thread-unsafe, suppose to be used only in initialization phase.
|
7
7
|
class Configuration
|
8
|
+
option = ENV['AWS_XRAY_LOCATION']
|
9
|
+
DEFAULT_HOST = option ? option.split(':').first : 'localhost'
|
10
|
+
DEFAULT_PORT = option ? Integer(option.split(':').last) : 2000
|
11
|
+
|
8
12
|
# @return [String] name Logical service name for this application.
|
9
13
|
attr_accessor :name
|
10
14
|
|
@@ -13,7 +17,7 @@ module Aws
|
|
13
17
|
# - port: e.g. 2000
|
14
18
|
# - sock: test purpose.
|
15
19
|
def client_options
|
16
|
-
@client_options ||= { host:
|
20
|
+
@client_options ||= { host: DEFAULT_HOST, port: DEFAULT_PORT }
|
17
21
|
end
|
18
22
|
attr_writer :client_options
|
19
23
|
|
data/lib/aws/xray/version.rb
CHANGED