Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixes Issues #188 - repeater can be configured for udp6, defaults to udp4 #190

Merged
merged 1 commit into from

2 participants

@sax
sax commented

Although repeaters default to udp4, this allows users to configure for udp6.

@mrtazz
Owner

I thought we decided in #188 that we want to decide between v4/v6 on a per-repeater level with default set to v4? I'm not sure if there is even a use case for this, so this patch might also be fine.

@sax
sax commented

Yeah, I was about to commit a patch that did so, but the more I thought about it, the more I figured you would just want one or the other.

The alternative would be this: sax@d37beb5

@mrtazz
Owner

I agree, the other option is much more complicated for a use case that probably doesn't exist.

@mrtazz mrtazz merged commit a714db4 into etsy:master

1 check passed

Details default The Travis build passed
@sax
sax commented

Awesome, thanks for merging it in!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 3, 2012
  1. @sax
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 1 deletion.
  1. +3 −1 backends/repeater.js
  2. +4 −0 exampleConfig.js
View
4 backends/repeater.js
@@ -4,7 +4,9 @@ var util = require('util'),
function RepeaterBackend(startupTime, config, emitter){
var self = this;
this.config = config.repeater || [];
- this.sock = dgram.createSocket('udp4');
+ this.sock = (config.repeaterProtocol == 'udp6') ?
+ dgram.createSocket('udp6') :
+ dgram.createSocket('udp4');
// attach
emitter.on('packet', function(packet, rinfo) { self.process(packet, rinfo); });
View
4 exampleConfig.js
@@ -49,6 +49,9 @@ Optional Variables:
packets should be "repeated" (duplicated to).
e.g. [ { host: '10.10.10.10', port: 8125 },
{ host: 'observer', port: 88125 } ]
+
+ repeaterProtocol: whether to use udp4 or udp4 for repeaters.
+ ["udp4" or "udp6", default: "udp4"]
*/
{
graphitePort: 2003
@@ -56,4 +59,5 @@ Optional Variables:
, port: 8125
, backends: [ "./backends/graphite" ]
, repeater: [ { host: "10.8.3.214", port: 8125 } ]
+, repeaterProtocol: "udp4"
}
Something went wrong with that request. Please try again.