synapse-nginx 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/synapse/config_generator/nginx.rb +9 -2
- data/lib/synapse-nginx.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a24a5baf1d0ac425d09aed0150125c75d5982c3
|
4
|
+
data.tar.gz: c854d62c189172f9f44afca0e60b7a37acdaf2dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1e50ed129fbb1551507cfeb948da6b6c3c9c346de81b41a7f6178dadaeaff8a2f68fc9484d354425fc12dc5a1d2f36c2501ba1dd0e5c4a5822f34b34fea0b87
|
7
|
+
data.tar.gz: 4d593e2b52d31d787e4e60924c8f1e9808d34a2867425e2644503822800a1447d06ee5ec35a798e901817b4335524d41cfd8bedfe5bca88d3d0b2a92d95d0760
|
data/README.md
CHANGED
@@ -81,6 +81,8 @@ nginx. (default: [])
|
|
81
81
|
* `listen_address`: force nginx to listen on this address (default is localhost).
|
82
82
|
Setting `listen_address` on a per service basis overrides the global `listen_address`
|
83
83
|
in the top level `nginx` config hash.
|
84
|
+
* `listen_options`: additional listen options provided as a string,
|
85
|
+
such as `reuseport`, to append to the listen line. (default is empty string)
|
84
86
|
* `upstream_order`: how servers should be ordered in the `upstream` stanza. Setting to `asc` means sorting backends in ascending alphabetical order before generating stanza. `desc` means descending alphabetical order. `no_shuffle` means no shuffling or sorting. (default: `shuffle`, which results in random ordering of upstream servers)
|
85
87
|
* `upstream_name`: The name of the generated nginx backend for this service
|
86
88
|
(defaults to the service's key in the `services` section)
|
@@ -157,11 +157,18 @@ class Synapse::ConfigGenerator
|
|
157
157
|
opts['listen_address'] ||
|
158
158
|
'localhost'
|
159
159
|
)
|
160
|
-
upstream_name = watcher_config.fetch('upstream_name', watcher.name)
|
161
160
|
|
161
|
+
listen_line= [
|
162
|
+
"\t\tlisten",
|
163
|
+
"#{listen_address}:#{port};",
|
164
|
+
watcher_config['listen_options']
|
165
|
+
].compact.join(' ')
|
166
|
+
|
167
|
+
|
168
|
+
upstream_name = watcher_config.fetch('upstream_name', watcher.name)
|
162
169
|
stanza = [
|
163
170
|
"\tserver {",
|
164
|
-
|
171
|
+
listen_line,
|
165
172
|
watcher_config['server'].map {|c| "\t\t#{c};"},
|
166
173
|
generate_proxy(watcher_config['mode'], upstream_name, watcher.backends.empty?),
|
167
174
|
"\t}",
|
data/lib/synapse-nginx.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: synapse-nginx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joseph Lynch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: synapse
|
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
92
|
version: '0'
|
93
93
|
requirements: []
|
94
94
|
rubyforge_project:
|
95
|
-
rubygems_version: 2.
|
95
|
+
rubygems_version: 2.4.5
|
96
96
|
signing_key:
|
97
97
|
specification_version: 4
|
98
98
|
summary: Dynamic NGINX configuration plugin for Synapse
|