envoy-proxy 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/envoy/server/command.rb +12 -4
- data/lib/envoy/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: f046303684c4123875d44395258679379b41ae60
|
4
|
+
data.tar.gz: e318d631b838ba50ea2cb626c991a962bd39c089
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7cea9a76c8294b8464a423440cb7063a86f1ba01dcb32776ea0398db334508d72b46efc3e7021051936d0c9b6e3b16dfd346a9fa0ca5ba49102bd5fe4bbf525
|
7
|
+
data.tar.gz: 74a4c7259958459bc27bfdcc2f913455821109468c7c360b7e26021b546d9f3a2740157cc9698145e061377bfa0a2bfd59add3de1451e2bf27f02acb86075e75
|
data/lib/envoy/server/command.rb
CHANGED
@@ -1,9 +1,17 @@
|
|
1
1
|
require 'envoy/server/trunk'
|
2
2
|
require 'envoy/server/web'
|
3
|
+
require 'optparse'
|
3
4
|
|
4
|
-
|
5
|
-
|
6
|
-
|
5
|
+
listen = []
|
6
|
+
|
7
|
+
OptionParser.new do |op|
|
8
|
+
op.banner = "Usage: #{$0} [options] ZONE"
|
9
|
+
op.on "-l", "--listen ADDRESS", "Listen on this [host:]port for HTTP" do |v|
|
10
|
+
port, host = v.split(":").reverse
|
11
|
+
listen = [host || "0.0.0", port]
|
12
|
+
end
|
13
|
+
op.parse!
|
14
|
+
op.abort "zone required" unless ARGV[0]
|
7
15
|
end
|
8
16
|
|
9
17
|
$zone = ARGV[0]
|
@@ -11,7 +19,7 @@ $zone = ARGV[0]
|
|
11
19
|
unless EM.reactor_running?
|
12
20
|
EM.run do
|
13
21
|
EM.start_server "0.0.0.0", 8282, Envoy::Server::Trunk
|
14
|
-
EM.start_server
|
22
|
+
EM.start_server *listen, Envoy::Server::Web
|
15
23
|
end
|
16
24
|
end
|
17
25
|
|
data/lib/envoy/version.rb
CHANGED